Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xinstall Initialize uid and gid so that the owner/gr...



details:   https://anonhg.NetBSD.org/src/rev/8f9766a03f35
branches:  trunk
changeset: 556451:8f9766a03f35
user:      heas <heas%NetBSD.org@localhost>
date:      Tue Dec 16 20:51:57 2003 +0000

description:
Initialize uid and gid so that the owner/group is not inadvertantly changed
when only one of -g or -o are given by the super-user and -g works for others.

diffstat:

 usr.bin/xinstall/xinstall.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 1c9297ce7a25 -r 8f9766a03f35 usr.bin/xinstall/xinstall.c
--- a/usr.bin/xinstall/xinstall.c       Tue Dec 16 18:59:10 2003 +0000
+++ b/usr.bin/xinstall/xinstall.c       Tue Dec 16 20:51:57 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xinstall.c,v 1.81 2003/11/21 21:20:25 christos Exp $   */
+/*     $NetBSD: xinstall.c,v 1.82 2003/12/16 20:51:57 heas Exp $       */
 
 /*
  * Copyright (c) 1987, 1993
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93";
 #else
-__RCSID("$NetBSD: xinstall.c,v 1.81 2003/11/21 21:20:25 christos Exp $");
+__RCSID("$NetBSD: xinstall.c,v 1.82 2003/12/16 20:51:57 heas Exp $");
 #endif
 #endif /* not lint */
 
@@ -81,7 +81,7 @@
 int    numberedbackup;
 int    mode = S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH;
 char   pathbuf[MAXPATHLEN];
-id_t   uid, gid;
+id_t   uid = -1, gid = -1;
 char   *group, *owner, *fflags, *tags;
 FILE   *metafp;
 char   *metafile;



Home | Main Index | Thread Index | Old Index