From de7353838a0ed78eb7bc797ce75be2a1605455b3 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sat, 2 Mar 2013 11:36:31 +0000 Subject: [PATCH] libadmin: Don't pass garbage to pts_UserCreate The libadmin pts_UserCreate function uses the value passed to it in newUserId to control whether the user is being created with a user supplied ID or not. Initialise this value in the caller, so we don't end up creating users with corrupt ids. Caught by clang (#985979) Reviewed-on: http://gerrit.openafs.org/9401 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 5cf4415c8ad400a92fc9c7f436ae52256db2ef09) Change-Id: I0e91352a98f63b386185abf9860dc056cb775821 Reviewed-on: http://gerrit.openafs.org/11050 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand --- src/libadmin/test/pts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libadmin/test/pts.c b/src/libadmin/test/pts.c index b6f50a563b..9007d415b7 100644 --- a/src/libadmin/test/pts.c +++ b/src/libadmin/test/pts.c @@ -326,7 +326,7 @@ DoPtsUserCreate(struct cmd_syndesc *as, void *arock) enum { USER }; afs_status_t st = 0; char *user = as->parms[USER].items->data; - int new_user_id; + int new_user_id = 0; if (!pts_UserCreate(cellHandle, user, &new_user_id, &st)) { ERR_ST_EXT("pts_UserCreate", st);