From: Simon Wilkinson Date: Sat, 2 Mar 2013 11:36:31 +0000 (+0000) Subject: libadmin: Don't pass garbage to pts_UserCreate X-Git-Tag: upstream/1.8.0_pre1^2~1343 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5cf4415c8ad400a92fc9c7f436ae52256db2ef09;p=packages%2Fo%2Fopenafs.git 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) Change-Id: I89492a02db9f981a4d2040ea913a7e75f5f0b272 Reviewed-on: http://gerrit.openafs.org/9401 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman --- diff --git a/src/libadmin/test/pts.c b/src/libadmin/test/pts.c index 109dda93b..504b32c37 100644 --- a/src/libadmin/test/pts.c +++ b/src/libadmin/test/pts.c @@ -327,7 +327,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);