summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/fileutl.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-09-25 12:33:26 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-09-25 12:33:26 +0200
commite31a89e668596ea86c8f3a08429cd2f48286e734 (patch)
tree417a694cc8dea17a352c2534f6a9e1f7b23178c6 /apt-pkg/contrib/fileutl.h
parent03bfbc965443393b92b2d6d82613472fa3a5067f (diff)
parent47d278dc7184606f751d015689e0c49eccde4547 (diff)
Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans
Diffstat (limited to 'apt-pkg/contrib/fileutl.h')
-rw-r--r--apt-pkg/contrib/fileutl.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index a8e255b86..9dd29eb9e 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -199,7 +199,17 @@ bool ExecWait(pid_t Pid,const char *Name,bool Reap = false);
// check if the given file starts with a PGP cleartext signature
bool StartsWithGPGClearTextSignature(std::string const &FileName);
-// process releated
+/**
+ * \brief Drop privileges
+ *
+ * Drop the privileges to the user _apt (or the one specified in
+ * APT::Sandbox::User). This does not set the supplementary group
+ * ids up correctly, it only uses the default group. Also prevent
+ * the process from gaining any new privileges afterwards, at least
+ * on Linux.
+ *
+ * \return true on success, false on failure with _error set
+ */
bool DropPrivs();
// File string manipulators