diff options
author | Alexander Larsson <alexl@redhat.com> | 2015-02-08 23:37:47 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2015-02-08 23:37:47 +0100 |
commit | 4ff10fee86b40ac30ca1f412e4d6ac8b4d20d70e (patch) | |
tree | 508b6450dcca03b20bb0498939f2481e03163cb7 /Makefile.am | |
parent | c8dd341440292e7fe1b737bdc323a9d9bc9bf627 (diff) | |
download | xdg-app-4ff10fee86b40ac30ca1f412e4d6ac8b4d20d70e.tar.gz |
Add support for --with-priv-mode=caps
This allows you to set the privs for the helper via file
capabilities instead of setuid.
You can also set the mode to none, but then you have to
manually set either setuid or filecaps (for instance via
a packaging script).
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 9fdd0b2..8f7a5d4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -97,8 +97,14 @@ xdg_app_LDADD = $(BASE_LIBS) $(OSTREE_LIBS) $(SOUP_LIBS) xdg_app_CFLAGS = $(BASE_CFLAGS) $(OSTREE_CFLAGS) $(SOUP_CFLAGS) install-exec-hook: +if PRIV_MODE_SETUID $(SUDO_BIN) chown root $(DESTDIR)$(bindir)/xdg-app-helper $(SUDO_BIN) chmod u+s $(DESTDIR)$(bindir)/xdg-app-helper +else +if PRIV_MODE_FILECAPS + $(SUDO_BIN) setcap cap_sys_admin,cap_mknod+ep /gnome/bin/xdg-app-helper +endif +endif completiondir = $(datadir)/bash-completion/completions completion_DATA = completion/xdg-app |