Skip to content

Commit

Permalink
add --max-ticket-duration to chirp_server
Browse files Browse the repository at this point in the history
  • Loading branch information
btovar committed Nov 19, 2024
1 parent 80558d1 commit 1cb3b5d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions chirp/src/chirp_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1841,6 +1841,7 @@ static void show_help(const char *cmd)
fprintf(stdout, " %-30s Location of transient data. (default: `.')\n", "-y,--transient=<dir>");
fprintf(stdout, " %-30s Select port at random and write it to this file. (default: disabled)\n", "-Z,--port-file=<file>");
fprintf(stdout, " %-30s Set max timeout for unix filesystem authentication. (default: 5s)\n", "-z,--unix-timeout=<file>");
fprintf(stdout, " %-30s Set max duration for authentication tickets, in seconds. (default is unlimited)\n", "--max-ticket-duration=<time>");
fprintf(stdout, "\n");
fprintf(stdout, "Where debug flags are: ");
debug_flags_print(stdout);
Expand All @@ -1855,6 +1856,7 @@ int main(int argc, char *argv[])
LONGOPT_JOB_TIME_LIMIT = INT_MAX-2,
LONGOPT_INHERIT_DEFAULT_ACL = INT_MAX-3,
LONGOPT_PROJECT_NAME = INT_MAX-4,
LONGOPT_MAX_TICKET_DURATION = INT_MAX-5,
};

static const struct option long_options[] = {
Expand All @@ -1878,6 +1880,7 @@ int main(int argc, char *argv[])
{"job-concurrency", required_argument, 0, LONGOPT_JOB_CONCURRENCY},
{"job-time-limit", required_argument, 0, LONGOPT_JOB_TIME_LIMIT},
{"max-clients", required_argument, 0, 'M'},
{"max-ticket-duration", required_argument, 0, LONGOPT_MAX_TICKET_DURATION},
{"no-core-dump", no_argument, 0, 'C'},
{"owner", required_argument, 0, 'w'},
{"parent-check", required_argument, 0, 'e'},
Expand Down Expand Up @@ -2061,6 +2064,10 @@ int main(int argc, char *argv[])
case LONGOPT_PROJECT_NAME:
strncpy(chirp_project_name, optarg, sizeof(chirp_project_name)-1);
break;
case LONGOPT_MAX_TICKET_DURATION:
free(ticket_duration_limit);
ticket_duration_limit = strdup(optarg);
break;
case 'h':
default:
show_help(argv[0]);
Expand Down
1 change: 1 addition & 0 deletions doc/man/m4/chirp_server.m4
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ OPTION_ARG(G,group-url, url)Base url for group lookups. (default: disabled)
OPTION_FLAG(h,help)Give help information.
OPTION_ARG(I, interface,addr)Listen only on this network interface.
OPTION_ARG(M, max-clients,count)Set the maximum number of clients to accept at once. (default unlimited)
OPTION_ARG_LONG(max-ticket-duration,time)Set max duration for authentication tickets, in seconds. (default is unlimited)
OPTION_ARG(n, catalog-name,name)Use this name when reporting to the catalog.
OPTION_ARG(o,debug-file,file)Write debugging output to this file. By default, debugging is sent to stderr (":stderr"). You may specify logs to be sent to stdout (":stdout") instead.
OPTION_ARG(O, debug-rotate-max,bytes)Rotate debug file once it reaches this size.
Expand Down
1 change: 1 addition & 0 deletions doc/man/md/chirp_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ For complete details with examples, see the [Chirp User's Manual](http://ccl.cse
- **-h**,**--help**<br />Give help information.
- **-I**,**--interface=_&lt;addr&gt;_**<br />Listen only on this network interface.
- **-M**,**--max-clients=_&lt;count&gt;_**<br />Set the maximum number of clients to accept at once. (default unlimited)
- **--max-ticket-duration=_&lt;time&gt;_**<br />Set max duration for authentication tickets, in seconds. (default is unlimited)
- **-n**,**--catalog-name=_&lt;name&gt;_**<br />Use this name when reporting to the catalog.
- **-o**,**--debug-file=_&lt;file&gt;_**<br />Write debugging output to this file. By default, debugging is sent to stderr (":stderr"). You may specify logs to be sent to stdout (":stdout") instead.
- **-O**,**--debug-rotate-max=_&lt;bytes&gt;_**<br />Rotate debug file once it reaches this size.
Expand Down

0 comments on commit 1cb3b5d

Please sign in to comment.