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

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Thu Mar 11 22:04:07 UTC 2010


Author: nekral-guest
Date: 2010-03-11 22:04:06 +0000 (Thu, 11 Mar 2010)
New Revision: 3105

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/userdel.c
Log:
	* src/userdel.c: Re-indent.
	* src/userdel.c: Added brackets.
	* src/userdel.c: Avoid implicit conversion of pointers to
	booleans.

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2010-03-11 22:03:57 UTC (rev 3104)
+++ upstream/trunk/ChangeLog	2010-03-11 22:04:06 UTC (rev 3105)
@@ -1,5 +1,12 @@
 2010-03-11  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/userdel.c: Re-indent.
+	* src/userdel.c: Added brackets.
+	* src/userdel.c: Avoid implicit conversion of pointers to
+	booleans.
+
+2010-03-11  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* lib/shadowio.c: Re-indent.
 	* lib/shadowio.c: Added brackets and parenthesis.
 	* lib/shadowio.c: Document the sections closed by #endif

Modified: upstream/trunk/src/userdel.c
===================================================================
--- upstream/trunk/src/userdel.c	2010-03-11 22:03:57 UTC (rev 3104)
+++ upstream/trunk/src/userdel.c	2010-03-11 22:04:06 UTC (rev 3105)
@@ -167,7 +167,7 @@
 			continue;
 		}
 
-		/* 
+		/*
 		 * Delete the username from the list of group members and
 		 * update the group entry to reflect the change.
 		 */
@@ -587,7 +587,7 @@
 	SYSLOG ((LOG_INFO, "delete user '%s'\n", user_name));
 }
 
-/* 
+/*
  * user_cancel - cancel cron and at jobs
  *
  *	user_cancel calls a script for additional cleanups like removal of
@@ -745,9 +745,10 @@
 	int ret = 0;
 	size_t bufsize = (sizeof TCB_DIR) + strlen (user_name) + 2;
 
-	if (!getdef_bool ("USE_TCB"))
+	if (!getdef_bool ("USE_TCB")) {
 		return 0;
-	
+	}
+
 	buf = malloc (buflen);
 	if (NULL == buf) {
 		fprintf (stderr, "Can't allocate memory, "
@@ -756,7 +757,7 @@
 		return 1;
 	}
 	snprintf (buf, buflen, TCB_DIR "/%s", user_name);
-	if (!shadowtcb_drop_priv ()) {
+	if (shadowtcb_drop_priv () == 0) {
 		perror ("shadowtcb_drop_priv");
 		free (buf);
 		return 1;
@@ -764,7 +765,7 @@
 	/* Only remove directory contents with dropped privileges.
 	 * We will regain them and remove the user's tcb directory afterwards.
 	 */
-	if (remove_tree (buf, false)) {
+	if (remove_tree (buf, false) != 0) {
 		perror ("remove_tree");
 		shadowtcb_gain_priv ();
 		free (buf);
@@ -772,7 +773,7 @@
 	}
 	shadowtcb_gain_priv ();
 	free (buf);
-	if (!shadowtcb_remove (user_name)) {
+	if (shadowtcb_remove (user_name) == 0) {
 		fprintf (stderr, "Cannot remove tcb files for %s: %s\n",
 		         user_name, strerror (errno));
 		ret = 1;
@@ -902,8 +903,9 @@
 		user_home = xstrdup (pwd->pw_dir);
 	}
 #ifdef WITH_TCB
-	if (!shadowtcb_set_user (user_name))
+	if (shadowtcb_set_user (user_name) == 0) {
 		exit (E_NOTFOUND);
+	}
 #endif				/* WITH_TCB */
 #ifdef	USE_NIS
 
@@ -1007,8 +1009,8 @@
 	if (rflg) {
 		if (remove_tree (user_home, true) != 0) {
 			fprintf (stderr,
-				 _("%s: error removing directory %s\n"),
-				 Prog, user_home);
+			         _("%s: error removing directory %s\n"),
+			         Prog, user_home);
 			errors++;
 			/* continue */
 		}




More information about the Pkg-shadow-commits mailing list