Fix parsing of -o uid and -o gid options, so that -o uidxx and -o gidxx

are not accepted.

Submitted by:	daichi, Masanori OZAWA <ozawa ongs co jp>
This commit is contained in:
rodrigc 2007-01-05 02:54:27 +00:00
parent 9f4ed86194
commit cb1006da55

View File

@ -151,11 +151,11 @@ main(int argc, char *argv[])
if (p != NULL) {
*p = '\0';
val = p + 1;
if (strncmp(optarg, "gid", 3) == 0) {
if (strcmp(optarg, "gid") == 0) {
parse_gid(val, gid_str, sizeof(gid_str));
val = gid_str;
}
else if (strncmp(optarg, "uid", 3) == 0) {
else if (strcmp(optarg, "uid") == 0) {
parse_uid(val, uid_str, sizeof(uid_str));
val = uid_str;
}