Lines Matching +full:1 +full:- +full:cell

2  * Copyright (c) 1997-2003 Kungliga Tekniska Högskolan
10 * 1. Redistributions of source code must retain the above copyright
57 static int use_krb5 = 1;
61 { "cell", 'c', arg_strings, &cells, "cells to get tokens for", "cell" },
63 { "realm", 'k', arg_string, &realm, "realm for afs cell", "realm" },
83 expand_one_file(FILE *f, const char *cell) in expand_one_file() argument
93 if(strncmp(buf + 1, cell, strlen(cell)) == 0) in expand_one_file()
94 return buf + 1; in expand_one_file()
102 expand_cell_name(const char *cell) in expand_cell_name() argument
115 c = expand_one_file(f, cell); in expand_cell_name()
120 return cell; in expand_cell_name()
126 arg_printusage(args, num_args, NULL, "[cell|path]..."); in usage()
131 char *cell; member
136 afslog_cell(const char *cell, int expand) in afslog_cell() argument
139 const char *c = cell; in afslog_cell()
141 c = expand_cell_name(cell); in afslog_cell()
143 warnx("No cell matching \"%s\" found.", cell); in afslog_cell()
144 return -1; in afslog_cell()
146 if(verbose && strcmp(c, cell) != 0) in afslog_cell()
147 warnx("Cell \"%s\" expanded to \"%s\"", cell, c); in afslog_cell()
151 for(p = cell_list, q = &cell_list; p; q = &p->next, p = p->next) in afslog_cell()
152 if(strcmp(p->cell, c) == 0) in afslog_cell()
156 return -1; in afslog_cell()
157 p->cell = strdup(c); in afslog_cell()
158 if(p->cell == NULL) { in afslog_cell()
160 return -1; in afslog_cell()
162 p->next = NULL; in afslog_cell()
170 char cell[64]; in afslog_file() local
171 if(k_afs_cell_of_file(path, cell, sizeof(cell))){ in afslog_file()
172 warnx("No cell found for file \"%s\".", path); in afslog_file()
173 return -1; in afslog_file()
176 warnx("File \"%s\" lives in cell \"%s\"", path, cell); in afslog_file()
177 return afslog_cell(cell, 0); in afslog_file()
181 do_afslog(const char *cell) in do_afslog() argument
189 k5ret = krb5_afslog(context, id, cell, realm); in do_afslog()
194 if (cell == NULL) in do_afslog()
195 cell = "<default cell>"; in do_afslog()
198 krb5_warn(context, k5ret, "krb5_afslog(%s)", cell); in do_afslog()
201 return 1; in do_afslog()
224 usage(1); in main()
233 errx(1, "AFS does not seem to be present on this machine"); in main()
276 afslog_cell(cells.strings[i], 1); in main()
288 afslog_cell(argv[i], 1); in main()
294 for(p = cell_list; p; p = p->next) { in main()
296 warnx("Getting tokens for cell \"%s\"", p->cell); in main()
297 if(do_afslog(p->cell)) in main()