Lines Matching defs:user
44 static char *user;
55 { "user", 'u', arg_string, &user,
56 "user other than current user (root only)", "user" },
71 * Renew the OTP for a user.
76 renew (int argc, char **argv, OtpAlgorithm *alg, char *user)
85 newctx.user = user;
112 * Return 0 if the user could enter the next OTP.
135 * Set the OTP for a user
139 set (int argc, char **argv, OtpAlgorithm *alg, char *user)
148 ctx.user = strdup (user);
149 if (ctx.user == NULL)
167 free (ctx.user);
172 free (ctx.user);
177 * Delete otp of user from the database
181 delete_otp (int argc, char **argv, char *user)
191 ctx.user = user;
198 * Tell whether the user has an otp
202 has_an_otp(char *user)
214 ctx.user = user;
222 * Get and print out the otp entry for some user
226 print_otp_entry_for_name (void *db, char *user)
230 ctx.user = user;
234 ctx.user, ctx.alg->name, ctx.n, ctx.seed);
245 open_otp (int argc, char **argv, char *user)
255 ctx.user = user;
268 list_otps (int argc, char **argv, char *user)
277 if (user)
278 print_otp_entry_for_name(db, user);
313 if (user && uid != 0)
332 return list_otps (argc, argv, user);
334 if (user == NULL) {
340 user = pwd->pw_name;
349 if (!has_an_otp(user)) {
352 if (verify_user_otp(user) != 0) {
359 return delete_otp (argc, argv, user);
361 return renew (argc, argv, alg, user);
363 return open_otp (argc, argv, user);
365 return set (argc, argv, alg, user);