diff options
author | kientzle <kientzle@FreeBSD.org> | 2010-02-06 19:56:32 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2010-02-06 19:56:32 +0000 |
commit | dad3a1b37a3f6813759df6178468cbef7560ba0a (patch) | |
tree | 5d14b98c57dc04deb4fdd7eb6d4128842762d5fb /usr.bin | |
parent | 8f2c956ea08e8e53c853ed6649591f2ae5c5f07e (diff) | |
download | FreeBSD-src-dad3a1b37a3f6813759df6178468cbef7560ba0a.zip FreeBSD-src-dad3a1b37a3f6813759df6178468cbef7560ba0a.tar.gz |
Remove all traces of an experiment for handling "root" on Windows systems.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tar/bsdtar.c | 7 | ||||
-rw-r--r-- | usr.bin/tar/bsdtar_platform.h | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/tar/bsdtar.c b/usr.bin/tar/bsdtar.c index 2504f72..80d4ded 100644 --- a/usr.bin/tar/bsdtar.c +++ b/usr.bin/tar/bsdtar.c @@ -159,8 +159,10 @@ main(int argc, char **argv) /* Default: Perform basic security checks. */ bsdtar->extract_flags |= SECURITY; - /* Defaults for root user: */ - if (bsdtar_is_privileged(bsdtar)) { +#ifndef _WIN32 + /* On POSIX systems, assume --same-owner and -p when run by + * the root user. This doesn't make any sense on Windows. */ + if (bsdtar->user_uid == 0) { /* --same-owner */ bsdtar->extract_flags |= ARCHIVE_EXTRACT_OWNER; /* -p */ @@ -169,6 +171,7 @@ main(int argc, char **argv) bsdtar->extract_flags |= ARCHIVE_EXTRACT_XATTR; bsdtar->extract_flags |= ARCHIVE_EXTRACT_FFLAGS; } +#endif bsdtar->argv = argv; bsdtar->argc = argc; diff --git a/usr.bin/tar/bsdtar_platform.h b/usr.bin/tar/bsdtar_platform.h index fb14442..ae586972 100644 --- a/usr.bin/tar/bsdtar_platform.h +++ b/usr.bin/tar/bsdtar_platform.h @@ -164,12 +164,8 @@ #define __LA_DEAD #endif -#if defined(__CYGWIN__) -#include "bsdtar_cygwin.h" -#elif defined(_WIN32) /* && !__CYGWIN__ */ +#if defined(_WIN32) && !defined(__CYGWIN__) #include "bsdtar_windows.h" -#else -#define bsdtar_is_privileged(bsdtar) (bsdtar->user_uid == 0) #endif #endif /* !BSDTAR_PLATFORM_H_INCLUDED */ |