readpwd: Make sure user supplies a passwdfile
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 2 Mar 2013 11:44:02 +0000 (11:44 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 7 Mar 2013 16:08:16 +0000 (08:08 -0800)
commitd81271640891fb8c364e8625e7a9f6ede21572f4
tree411689ac54678b0be60c7a2867948daf328ed2c0
parent3c564444cf1c0bad25792b10edc158030e180369
readpwd: Make sure user supplies a passwdfile

If the user supplies enough command line arguments, but doesn't
provide a passwdfile, then we can end up trying to open whatever
garbage is on the stack.

Once we've finished parsing the command line arguments, make sure
that a filename was supplied.

Caught by coverity (#986009)

Change-Id: Ice2fca16458a90d73ae6b5fadb0efa22ed0b185a
Reviewed-on: http://gerrit.openafs.org/9441
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/ptserver/readpwd.c