]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dbus-exporter: Set explicit mode on output directory
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 21 Mar 2024 18:14:56 +0000 (19:14 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 21 Mar 2024 22:54:25 +0000 (07:54 +0900)
Otherwise the created directory might have the sticky bit or the setgid
bit set as these are inherited from the parent directory.

tools/dbus_exporter.py

index 819584dcbab0de5518b09f2a9e8317587c5ec47f..db95a58950d96649eaa3d5e6e6014cfbeb2eac85 100755 (executable)
@@ -36,6 +36,8 @@ def main():
     args = parser.parse_args()
 
     args.output.mkdir(exist_ok=True)
+    # Make sure we don't inherit any setgid/setuid bit or such.
+    args.output.chmod(mode=0o755)
     for exe in args.executables:
         extract_interfaces_xml(args.output, exe)