diff options
author | ru <ru@FreeBSD.org> | 2007-03-06 14:54:45 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2007-03-06 14:54:45 +0000 |
commit | 6c577a7377fc199307cbe92722393ad3b087786b (patch) | |
tree | 7891f889ff7fbb6b6b7a0e30290e035762be510c /usr.sbin/pkg_install/lib | |
parent | ea65834348d84e4cf6ecb91e842ca587a9afdc03 (diff) | |
download | FreeBSD-src-6c577a7377fc199307cbe92722393ad3b087786b.zip FreeBSD-src-6c577a7377fc199307cbe92722393ad3b087786b.tar.gz |
Invoke tar(1) with the -p option when installing a package
from an URL (i.e., do it the same way as when installing
from a file). This fixes the lossage of the setuid bits.
It wasn't a problem before because GNU tar(1) implied the
-p option for root, but BSD tar(1) doesn't do that.
Discussed with: tobez and some advanced users :)
Diffstat (limited to 'usr.sbin/pkg_install/lib')
-rw-r--r-- | usr.sbin/pkg_install/lib/url.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/lib/url.c b/usr.sbin/pkg_install/lib/url.c index d2def97..d01b116 100644 --- a/usr.sbin/pkg_install/lib/url.c +++ b/usr.sbin/pkg_install/lib/url.c @@ -142,9 +142,9 @@ fileGetURL(const char *base, const char *spec, int keep_package) close(fd); execl("/usr/bin/tar", "tar", #if defined(__FreeBSD_version) && __FreeBSD_version >= 500039 - Verbose ? "-xjvf" : "-xjf", + Verbose ? "-xpjvf" : "-xpjf", #else - Verbose ? "-xzvf" : "-xzf", + Verbose ? "-xpzvf" : "-xpzf", #endif "-", (char *)0); _exit(2); |