From: Simon Wilkinson Date: Sat, 2 Mar 2013 11:36:31 +0000 (+0000) Subject: libadmin: Don't pass garbage to pts_GroupCreate X-Git-Tag: upstream/1.6.10_pre1^2~141 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ce9230839696af7f6fbcca23364f9ee0fdf2e759;p=packages%2Fo%2Fopenafs.git libadmin: Don't pass garbage to pts_GroupCreate The libadmin pts_GroupCreate function uses the value passed to it in newGroupId to control whether the group is being created with a user supplied ID or not. Initialise this value in the caller, so we don't end up creating groups with corrupt ids. Caught by clang (#985978) Reviewed-on: http://gerrit.openafs.org/9400 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit ece7bd669af0c58dcaa2589e093387adb7d1756a) Change-Id: I51750db47f7709406c079c4fbeec561228359e73 Reviewed-on: http://gerrit.openafs.org/11049 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand --- diff --git a/src/libadmin/test/pts.c b/src/libadmin/test/pts.c index 3a0541b2b..b6f50a563 100644 --- a/src/libadmin/test/pts.c +++ b/src/libadmin/test/pts.c @@ -124,7 +124,7 @@ DoPtsGroupCreate(struct cmd_syndesc *as, void *arock) afs_status_t st = 0; char *owner = as->parms[OWNER].items->data; char *group = as->parms[GROUP].items->data; - int new_group_id; + int new_group_id = 0; if (!pts_GroupCreate(cellHandle, group, owner, &new_group_id, &st)) { ERR_ST_EXT("pts_GroupMemberAdd", st);