[Pkg-shadow-commits] r3452 - in upstream/trunk: . src

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Thu Jul 28 14:40:57 UTC 2011


Author: nekral-guest
Date: 2011-07-28 14:40:56 +0000 (Thu, 28 Jul 2011)
New Revision: 3452

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/grpunconv.c
   upstream/trunk/src/pwunconv.c
Log:
	* src/pwunconv.c: Exit after printing usage when arguments or
	options are provided.
	* src/pwunconv.c: Re-indent.
	* src/pwunconv.c: Open the shadow file read only.
	* src/grpunconv.c: Exit after printing usage when arguments or
	options are provided.
	* src/grpunconv.c: Open the gshadow file read only.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2011-07-28 14:36:24 UTC (rev 3451)
+++ upstream/trunk/ChangeLog	2011-07-28 14:40:56 UTC (rev 3452)
@@ -1,5 +1,15 @@
 2011-07-28  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/pwunconv.c: Exit after printing usage when arguments or
+	options are provided.
+	* src/pwunconv.c: Re-indent.
+	* src/pwunconv.c: Open the shadow file read only.
+	* src/grpunconv.c: Exit after printing usage when arguments or
+	options are provided.
+	* src/grpunconv.c: Open the gshadow file read only.
+
+2011-07-28  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/chgpasswd.c: Fix typo.
 
 2011-07-23  Nicolas François  <nicolas.francois at centraliens.net>

Modified: upstream/trunk/src/grpunconv.c
===================================================================
--- upstream/trunk/src/grpunconv.c	2011-07-28 14:36:24 UTC (rev 3451)
+++ upstream/trunk/src/grpunconv.c	2011-07-28 14:40:56 UTC (rev 3452)
@@ -2,7 +2,7 @@
  * Copyright (c) 1996       , Michael Meskes
  * Copyright (c) 1996 - 2000, Marek Michałkiewicz
  * Copyright (c) 2002 - 2006, Tomasz Kłoczko
- * Copyright (c) 2008       , Nicolas François
+ * Copyright (c) 2008 - 2011, Nicolas François
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -91,6 +91,7 @@
 
 	if (1 != argc) {
 		(void) fputs (_("Usage: grpunconv\n"), stderr);
+		exit (1);
 	}
 	Prog = Basename (argv[0]);
 
@@ -124,7 +125,7 @@
 		fail_exit (5);
 	}
 	sgr_locked = true;
-	if (sgr_open (O_RDWR) == 0) {
+	if (sgr_open (O_RDONLY) == 0) {
 		fprintf (stderr,
 		         _("%s: cannot open %s\n"), Prog, sgr_dbname ());
 		fail_exit (1);

Modified: upstream/trunk/src/pwunconv.c
===================================================================
--- upstream/trunk/src/pwunconv.c	2011-07-28 14:36:24 UTC (rev 3451)
+++ upstream/trunk/src/pwunconv.c	2011-07-28 14:40:56 UTC (rev 3452)
@@ -2,7 +2,7 @@
  * Copyright (c) 1989 - 1994, Julianne Frances Haugh
  * Copyright (c) 1996 - 2000, Marek Michałkiewicz
  * Copyright (c) 2001 - 2005, Tomasz Kłoczko
- * Copyright (c) 2008       , Nicolas François
+ * Copyright (c) 2008 - 2011, Nicolas François
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -84,6 +84,7 @@
 
 	if (1 != argc) {
 		(void) fputs (_("Usage: pwunconv\n"), stderr);
+		exit (1);
 	}
 	Prog = Basename (argv[0]);
 
@@ -95,8 +96,8 @@
 
 #ifdef WITH_TCB
 	if (getdef_bool("USE_TCB")) {
-		fprintf(stderr, _("%s: can't work with tcb enabled\n"), Prog);
-		exit(1);
+		fprintf (stderr, _("%s: can't work with tcb enabled\n"), Prog);
+		exit (1);
 	}
 #endif				/* WITH_TCB */
 
@@ -126,7 +127,7 @@
 		fail_exit (5);
 	}
 	spw_locked = true;
-	if (spw_open (O_RDWR) == 0) {
+	if (spw_open (O_RDONLY) == 0) {
 		fprintf (stderr,
 		         _("%s: cannot open %s\n"),
 		         Prog, spw_dbname ());




More information about the Pkg-shadow-commits mailing list