mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
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 <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 5cf4415c8a
)
Change-Id: I0e91352a98f63b386185abf9860dc056cb775821
Reviewed-on: http://gerrit.openafs.org/11050
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
This commit is contained in:
parent
ce92308396
commit
de7353838a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user