Lines Matching defs:path
19 * root syntax: afppasswd [-c] [-a] [-p path] [-f] [username]
118 static int update_passwd(const char *path, const char *name, int flags)
125 if ((fp = fopen(path, "r+")) == NULL) {
126 fprintf(stderr, "afppasswd: can't open %s\n", path);
131 strcpy(buf, path);
132 if (strlen(path) < sizeof(buf) - 5) {
162 fprintf(stderr, "afppasswd: can't find %s in %s\n", name, path);
224 static int create_file(const char *path, uid_t minuid)
230 if ((fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0600)) < 0) {
231 fprintf(stderr, "afppasswd: can't create %s\n", path);
246 fprintf(stderr, "afppasswd: problem writing to %s: %s\n", path,
264 char *path = _PATH_AFPDPWFILE;
273 fprintf(stderr, "Usage: afppasswd [-acfn] [-u minuid] [-p path] [username]\n");
281 fprintf(stderr, " -p path path to afppasswd file\n");
304 case 'p': /* path to afppasswd file */
305 path = optarg;
316 fprintf(stderr, "Usage: afppasswd [-acfn] [-u minuid] [-p path] [username]\n");
318 fprintf(stderr, "Usage: afppasswd [-acf] [-u minuid] [-p path] [username]\n");
327 fprintf(stderr, " -p path path to afppasswd file\n");
331 i = stat(path, &st);
342 return create_file(path, uid_min);
348 fprintf(stderr, "afppasswd: %s doesn't exist.\n", path);
355 return update_passwd(path, pwd->pw_name, flags);