mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 21:18:59 +00:00
Remove all traces of an experiment for handling "root" on Windows systems.
This commit is contained in:
parent
2be336325b
commit
82fb15c15a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=203560
@ -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;
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user