commit e9a9fcbce454492da0a3e86c5620ec8c70e3b427
parent 429002cc7a9458ef5224db422ba4899da0ed9d6d
Author: Claudio Alessi <smoppy@gmail.com>
Date: Sat, 21 Jan 2023 13:29:31 +0100
[iwpick] Allow execution with setuid.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/iwpick b/src/iwpick
@@ -88,7 +88,7 @@ main() {
esac
done
- [ "$(id -u)" -ne 0 ] && die "You must be root"
+ [ "$(id -u)" -ne 0 -a ! -u "$0" ] && die "You must be root"
if [ $pick -eq 1 ]; then
echo "Looking for a suitable network... "
essid="$(pickone "$iface" "$file")"