diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-03-31 17:14:24 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-03-31 17:14:24 +0000 |
commit | d014dd23f3875fdf9c5e39038fdc8f20fd4a7295 (patch) | |
tree | 1ba7b169babb7a43188295d2bff5afbfbeb59876 /bin | |
parent | 3409d2f69b262c4ab123b92edce67887cfc91ca4 (diff) |
only preserve uid/gid if -p. This is unlike traditional tar but more like gtar
Diffstat (limited to 'bin')
-rw-r--r-- | bin/pax/options.c | 10 | ||||
-rw-r--r-- | bin/pax/tar.1 | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/bin/pax/options.c b/bin/pax/options.c index c0f6b085d6d..42bb211bcd8 100644 --- a/bin/pax/options.c +++ b/bin/pax/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.32 1998/03/03 05:11:36 millert Exp $ */ +/* $OpenBSD: options.c,v 1.33 1998/03/31 17:14:21 millert Exp $ */ /* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: options.c,v 1.32 1998/03/03 05:11:36 millert Exp $"; +static char rcsid[] = "$OpenBSD: options.c,v 1.33 1998/03/31 17:14:21 millert Exp $"; #endif #endif /* not lint */ @@ -672,9 +672,10 @@ tar_options(argc, argv) break; case 'p': /* - * preserve file mode, regardless of umask + * preserve uid/gid and file mode, regardless of umask */ pmode = 1; + pids = 1; break; case 'r': case 'u': @@ -713,11 +714,10 @@ tar_options(argc, argv) case 'x': /* * extract an archive, preserving mode, - * mtime and ids if possible. + * and mtime if possible. */ act = EXTRACT; pmtime = 1; - pids = 1; break; case 'z': /* diff --git a/bin/pax/tar.1 b/bin/pax/tar.1 index ab8bab89c7b..8dd7d3046c3 100644 --- a/bin/pax/tar.1 +++ b/bin/pax/tar.1 @@ -27,7 +27,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: tar.1,v 1.14 1998/03/03 05:11:34 millert Exp $ +.\" $OpenBSD: tar.1,v 1.15 1998/03/31 17:14:23 millert Exp $ .\" .Dd June 11, 1996 .Dt TAR 1 @@ -77,9 +77,8 @@ Extract files from archive. If any files are named on the command line, only those files will be extracted from the archive. If more than one copy of a file exists in the archive, later copies will overwrite earlier copies during -extraction. The user id, group id, file mode, and modification -time are preserved if possible. The file mode is subject to -modification by the +extraction. The file mode and modification time are preserved +if possible. The file mode is subject to modification by the .Xr umask 2 . .El .Pp @@ -113,7 +112,8 @@ This implies the .Fl O flag. .It Fl p -Preserve file mode regardless of the current +Preserve user and group id as well as file mode regardless of +the current .Xr umask 2 . The setuid and setgid bits are only preserved if the user is the superuser. Only meaningful in conjunction with the |