[Pkg-shadow-commits] r3136 - in upstream/trunk: . lib

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Thu Mar 18 00:05:46 UTC 2010


Author: nekral-guest
Date: 2010-03-18 00:05:35 +0000 (Thu, 18 Mar 2010)
New Revision: 3136

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/lib/tcbfuncs.c
Log:
	* lib/tcbfuncs.c: move_dir() and shadowtcb_move() need a non NULL
	stored_tcb_user.

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2010-03-18 00:05:11 UTC (rev 3135)
+++ upstream/trunk/ChangeLog	2010-03-18 00:05:35 UTC (rev 3136)
@@ -18,6 +18,8 @@
 	* lib/tcbfuncs.c: Avoid integer to char conversions.
 	* lib/tcbfuncs.c: Include prototypes.h for the definition of Prog.
 	* lib/tcbfuncs.c: Removed dead return.
+	* lib/tcbfuncs.c: move_dir() and shadowtcb_move() need a non NULL
+	stored_tcb_user.
 
 2010-03-17  Nicolas François  <nicolas.francois at centraliens.net>
 

Modified: upstream/trunk/lib/tcbfuncs.c
===================================================================
--- upstream/trunk/lib/tcbfuncs.c	2010-03-18 00:05:11 UTC (rev 3135)
+++ upstream/trunk/lib/tcbfuncs.c	2010-03-18 00:05:35 UTC (rev 3136)
@@ -278,6 +278,9 @@
 	struct stat oldmode;
 	shadowtcb_status ret = SHADOWTCB_FAILURE;
 
+	if (NULL == stored_tcb_user) {
+		return SHADOWTCB_FAILURE;
+	}
 	if (asprintf(&olddir, TCB_DIR "/%s", stored_tcb_user) == -1)
 		goto out_free_nomem;
 	if (stat(olddir, &oldmode) != 0) {
@@ -391,6 +394,8 @@
 
 	if (!getdef_bool("USE_TCB"))
 		return SHADOWTCB_SUCCESS;
+	if (NULL == stored_tcb_user)
+		return SHADOWTCB_FAILURE;
 	if (NULL == user_newname)
 		user_newname = stored_tcb_user;
 	if (move_dir(user_newname, user_newid) == SHADOWTCB_FAILURE)




More information about the Pkg-shadow-commits mailing list