mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 04:32:37 +01:00
test-runner: require root user to run with --monitor
Since the monitor file requires touching the host file system, root access is required.
This commit is contained in:
parent
c2d71fdaa5
commit
272a60a478
@ -1434,6 +1434,10 @@ class Main:
|
||||
options += ' --log-uid %u' % uid
|
||||
|
||||
if self.args.monitor:
|
||||
if os.environ.get('SUDO_GID', None) is None:
|
||||
print("--monitor can only be used as root user")
|
||||
quit()
|
||||
|
||||
self.args.monitor = os.path.abspath(self.args.monitor)
|
||||
mon_parent_dir = os.path.abspath(os.path.join(self.args.monitor, os.pardir))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user