218 Commits (f19d6a77f60b876e5453614d24886aabdd242ef6)

Author SHA1 Message Date
Julian Andres Klode 2da8aae555 Always close compressed files in FileFd 8 years ago
Julian Andres Klode 5a3264396f Use setresuid() and setresgid() where available 7 years ago
Julian Andres Klode 98cc7fd2c1 Deprecate SPtrArray<T> and convert everyone to unique_ptr<T[]> 7 years ago
Julian Andres Klode be4d908fb5 ExecFork: Use /proc/self/fd to determine which files to close 7 years ago
David Kalnischkies c9443c0120 elimate duplicated code in pkgIndexFile subclasses 7 years ago
David Kalnischkies 6c55f07a5f make all d-pointer * const pointers 7 years ago
Michael Vogt 1590151632 Move sysconf(_SC_OPEN_MAX); out of the for() loop to avoid unneeded syscalls 7 years ago
David Kalnischkies d84da4995d ensure lists/ files have correct permissions after apt-cdrom add 7 years ago
David Kalnischkies 0d303f1764 test if TMPDIR is accessible before using 7 years ago
David Kalnischkies 990dd78ab4 set PR_SET_NO_NEW_PRIVS even if sandbox is disabled 7 years ago
Michael Vogt 9983999d29 Fix backward compatiblity of the new pkgAcquireMethod::DropPrivsOrDie() 7 years ago
David Kalnischkies 8f45798d53 set PR_SET_NO_NEW_PRIVS also if run as non-root 7 years ago
David Kalnischkies f8aba23f2e fix foldmarkers in fileutl.cc 7 years ago
Michael Vogt 263a781e1f Ignore EINVAL from prctl(PR_SET_NO_NEW_PRIVS) 7 years ago
Michael Vogt 373fa2b4b2 Rename DropPrivs() to DropPrivileges() 7 years ago
Michael Vogt c36db2b56a Adjust DestFile in ReverifyAfterIMS() to not include compr Extension 7 years ago
David Kalnischkies 5e49cbb7b6 fix: Consecutive return, break, continue, goto or throw statements are unnecessary. 7 years ago
David Kalnischkies 25613a61f6 fix: Member variable 'X' is not initialized in the constructor. 7 years ago
Julian Andres Klode b8dae9a106 DropPrivs: Use APT::Sandbox::User instead of Apt::User::Nobody 7 years ago
Julian Andres Klode ca8e327ab7 DropPrivs: Hard-fail if the user does not exist 7 years ago
Julian Andres Klode 48ed0977d2 DropPrivs: Add some comments for the more obscure setuid/setgid functions 7 years ago
Julian Andres Klode bdc00df54d DropPrivs: Move the re-set uid/gid thing to the end of the function 7 years ago
Julian Andres Klode f1e3c8f002 DropPrivs: Improve comments 7 years ago
Julian Andres Klode 550ab420d3 DropPrivs: Also check for saved set-user-ID and set-group-ID 7 years ago
Julian Andres Klode 3b084f06b6 DropPrivs: Do not use an invalid return check for setgroups() 7 years ago
Julian Andres Klode eed65c7932 Use _apt as our unprivileged user name 7 years ago
Julian Andres Klode 5f2047ece8 DropPriv: Really call seteuid and not setuid, and add more checks 7 years ago
Michael Vogt 3927c6da48 Drop Privileges to "Debian-apt" in most acquire methods 7 years ago
Michael Vogt fc1a78d8e9 DropPrivs in the solvers (just to be on the safe side) 8 years ago
David Kalnischkies 003c40d373 without a filename we can't stat pipes 8 years ago
Michael Vogt 21ea1dbb50 use free() instead of delete() when realloc is used 8 years ago
Michael Vogt 53ac87ac9c add flAbsPath() as a wrapper to realpath() 8 years ago
Michael Vogt 7ad2a3477f Implement Popen() execv helper to avoid popen() 8 years ago
Michael Vogt 0d29b9d436 WIP local deb install 8 years ago
Adam Conrad 05eab8afb6 fix FileFd::Size bitswap on big-endian architectures 8 years ago
David Kalnischkies bb93178b8b clear HitEof flag in FileFd::Seek 8 years ago
David Kalnischkies 230e69d718 deal with umask only if we really need to for mkstemp 8 years ago
David Kalnischkies 21ba8115c8 don't double-count seeks in FileFd::Skip for bzip/xz 8 years ago
Michael Vogt db5bf949ed improve umask/fchmod code readability 8 years ago
Michael Vogt e5f3f8c101 Rename FileFd::Open() Perms to AccessMode 8 years ago
Michael Vogt f22b65b479 Fix insecure file permissions when using FileFd with OpenMode::Atomic 8 years ago
Michael Vogt e5b7e01923 Add new Debug::RunScripts option 8 years ago
David Kalnischkies c4b113e650 continue reading in xz even if it outputs nothing 8 years ago
Julian Andres Klode f6ffe501d4 Fix handling of autoclosing for compressed files (Closes: #741685) 8 years ago
David Kalnischkies 4239dbca05 refactor FileFd to hide some #ifdefs 8 years ago
David Kalnischkies 7f350a377e use liblzma-dev to provide xz/lzma support 8 years ago
David Kalnischkies 69d6988a19 refactor setup of file opening via zlib/bz2 lib 9 years ago
David Kalnischkies 84baaae93b move fd duplication closer to the gz/bz2 open calls 9 years ago
David Kalnischkies 453b82a388 cleanup headers and especially #includes everywhere 8 years ago
David Kalnischkies e788a834ce warning: useless cast to type A [-Wuseless-cast] 8 years ago