summaryrefslogtreecommitdiff
path: root/meson_post_install.py
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-06-27 15:39:19 +0100
committerSimon McVittie <smcv@collabora.com>2022-07-13 20:36:13 +0100
commit6eefa5da3453e560aaf311fd4801c14b10428c84 (patch)
tree605a2c16befda50d9ce965bad39a49f53f84d16d /meson_post_install.py
parent398820d1fe45f85ac0a22971b88ce8a9903e4d70 (diff)
meson_post_install.py: Call chmod after chown
If we call chmod before chown, then chown will remove the setuid bit. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'meson_post_install.py')
-rwxr-xr-xmeson_post_install.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meson_post_install.py b/meson_post_install.py
index 3b083130..9c558c99 100755
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -91,8 +91,8 @@ def post_install_exe():
exe_path = abs_libdir / 'dbus-1.0' / exe_name
dbus_user = get_option('dbus_user')
if os.getuid() == 0:
- os.chmod(exe_path, stat.S_ISUID | stat.S_IXUSR | stat.S_IXGRP)
os.chown(exe_path, 0, grp.getgrnam(dbus_user).gr_gid)
+ os.chmod(exe_path, stat.S_ISUID | stat.S_IXUSR | stat.S_IXGRP)
else:
print('Not installing {0} binary setuid!'.format(exe_path))
print('You\'ll need to manually set permissions to root:{0} and permissions 4750'