/* flags from command line */
char *class, *comment, *status_str, *shell, *winconsoleshell, *filename;
+char *expiration;
int reg_only, reg, verbose, nodupcheck, securereg, nocaps;
struct owner_type *sponsor;
winconsoleshell = DEFAULT_WINCONSOLESHELL;
class = "TEMP";
comment = "";
+ expiration = "";
status_str = "0";
whoami = argv[0];
else
usage(argv);
}
+ else if (argis("e", "expiration"))
+ {
+ if (arg - argv < argc - 1)
+ {
+ ++arg;
+ expiration = *arg;
+ }
+ else
+ usage(argv);
+ }
else if (argis("6", "secure"))
securereg++;
else if (argis("r", "reg_only"))
qargv[U_WINCONSOLESHELL] = winconsoleshell;
qargv[U_WINHOMEDIR] = DEFAULT_WINHOMEDIR;
qargv[U_WINPROFILEDIR] = DEFAULT_WINPROFILEDIR;
+ qargv[U_EXPIRATION] = expiration;
qargv[U_STATE] = status_str;
qargv[U_CLASS] = class;
qargv[U_COMMENT] = comment;
case M_ANY:
case M_USER:
qargv[U_SPONSOR_TYPE] = "USER";
- status = mr_query("add_user_account", 17, qargv, NULL, NULL);
+ status = mr_query("add_user_account", 18, qargv, NULL, NULL);
if (sponsor->type != M_ANY || status != MR_USER)
break;
case M_LIST:
qargv[U_SPONSOR_TYPE] = "LIST";
- status = mr_query("add_user_account", 17, qargv, NULL, NULL);
+ status = mr_query("add_user_account", 18, qargv, NULL, NULL);
break;
case M_KERBEROS:
mrcl_com_err(whoami);
if (status == MRCL_REJECT)
exit(1);
- status = mr_query("add_user_account", 17, qargv, NULL, NULL);
+ status = mr_query("add_user_account", 18, qargv, NULL, NULL);
break;
case M_NONE:
qargv[U_SPONSOR_TYPE] = "NONE";
- status = mr_query("add_user_account", 17, qargv, NULL, NULL);
+ status = mr_query("add_user_account", 18, qargv, NULL, NULL);
break;
}
}
qargv[U_SPONSOR_TYPE] = "NONE";
qargv[U_SPONSOR_NAME] = "NONE";
- status = mr_query("add_user_account", 17, qargv, NULL, NULL);
+ status = mr_query("add_user_account", 18, qargv, NULL, NULL);
}
if (status)
fprintf(stderr, " -w | -winshell windows console shell (default %s)\n",
DEFAULT_WINCONSOLESHELL);
fprintf(stderr, " -sp | -sponsor sponsor (default NONE)\n");
+ fprintf(stderr, " -e | -expiration \"expiration date\" (default \"\")\n");
fprintf(stderr, " -r | -reg_only\n");
fprintf(stderr, " -R | -register (and add to database)\n");
fprintf(stderr, " -v | -verbose\n");