View | Details | Raw Unified | Return to bug 2381
Collapse All | Expand All

(-)a/ssh-agent.1 (-1 / +7 lines)
Lines 43-48 Link Here
43
.Sh SYNOPSIS
43
.Sh SYNOPSIS
44
.Nm ssh-agent
44
.Nm ssh-agent
45
.Op Fl c | s
45
.Op Fl c | s
46
.Op Fl D
46
.Op Fl d
47
.Op Fl d
47
.Op Fl a Ar bind_address
48
.Op Fl a Ar bind_address
48
.Op Fl E Ar fingerprint_hash
49
.Op Fl E Ar fingerprint_hash
Lines 92-102 Generate C-shell commands on Link Here
92
This is the default if
93
This is the default if
93
.Ev SHELL
94
.Ev SHELL
94
looks like it's a csh style of shell.
95
looks like it's a csh style of shell.
96
.It Fl D
97
Foreground mode.
98
When this option is specified
99
.Nm
100
will not fork.
95
.It Fl d
101
.It Fl d
96
Debug mode.
102
Debug mode.
97
When this option is specified
103
When this option is specified
98
.Nm
104
.Nm
99
will not fork.
105
will not fork and will write debug information to standard error.
100
.It Fl E Ar fingerprint_hash
106
.It Fl E Ar fingerprint_hash
101
Specifies the hash algorithm used when displaying key fingerprints.
107
Specifies the hash algorithm used when displaying key fingerprints.
102
Valid options are:
108
Valid options are:
(-)a/ssh-agent.c (-7 / +14 lines)
Lines 1146-1152 usage(void) Link Here
1146
int
1146
int
1147
main(int ac, char **av)
1147
main(int ac, char **av)
1148
{
1148
{
1149
	int c_flag = 0, d_flag = 0, k_flag = 0, s_flag = 0;
1149
	int c_flag = 0, d_flag = 0, D_flag = 0, k_flag = 0, s_flag = 0;
1150
	int sock, fd, ch, result, saved_errno;
1150
	int sock, fd, ch, result, saved_errno;
1151
	u_int nalloc;
1151
	u_int nalloc;
1152
	char *shell, *format, *pidstr, *agentsocket = NULL;
1152
	char *shell, *format, *pidstr, *agentsocket = NULL;
Lines 1181-1187 main(int ac, char **av) Link Here
1181
	__progname = ssh_get_progname(av[0]);
1181
	__progname = ssh_get_progname(av[0]);
1182
	seed_rng();
1182
	seed_rng();
1183
1183
1184
	while ((ch = getopt(ac, av, "cdksE:a:t:")) != -1) {
1184
	while ((ch = getopt(ac, av, "cDdksE:a:t:")) != -1) {
1185
		switch (ch) {
1185
		switch (ch) {
1186
		case 'E':
1186
		case 'E':
1187
			fingerprint_hash = ssh_digest_alg_by_name(optarg);
1187
			fingerprint_hash = ssh_digest_alg_by_name(optarg);
Lines 1202-1211 main(int ac, char **av) Link Here
1202
			s_flag++;
1202
			s_flag++;
1203
			break;
1203
			break;
1204
		case 'd':
1204
		case 'd':
1205
			if (d_flag)
1205
			if (d_flag || D_flag)
1206
				usage();
1206
				usage();
1207
			d_flag++;
1207
			d_flag++;
1208
			break;
1208
			break;
1209
		case 'D':
1210
			if (d_flag || D_flag)
1211
				usage();
1212
			D_flag++;
1213
			break;
1209
		case 'a':
1214
		case 'a':
1210
			agentsocket = optarg;
1215
			agentsocket = optarg;
1211
			break;
1216
			break;
Lines 1222-1228 main(int ac, char **av) Link Here
1222
	ac -= optind;
1227
	ac -= optind;
1223
	av += optind;
1228
	av += optind;
1224
1229
1225
	if (ac > 0 && (c_flag || k_flag || s_flag || d_flag))
1230
	if (ac > 0 && (c_flag || k_flag || s_flag || d_flag || D_flag))
1226
		usage();
1231
		usage();
1227
1232
1228
	if (ac == 0 && !c_flag && !s_flag) {
1233
	if (ac == 0 && !c_flag && !s_flag) {
Lines 1291-1298 main(int ac, char **av) Link Here
1291
	 * Fork, and have the parent execute the command, if any, or present
1296
	 * Fork, and have the parent execute the command, if any, or present
1292
	 * the socket data.  The child continues as the authentication agent.
1297
	 * the socket data.  The child continues as the authentication agent.
1293
	 */
1298
	 */
1294
	if (d_flag) {
1299
	if (D_flag || d_flag) {
1295
		log_init(__progname, SYSLOG_LEVEL_DEBUG1, SYSLOG_FACILITY_AUTH, 1);
1300
		log_init(__progname,
1301
		    d_flag ? SYSLOG_LEVEL_DEBUG3 : SYSLOG_LEVEL_INFO,
1302
		    SYSLOG_FACILITY_AUTH, 1);
1296
		format = c_flag ? "setenv %s %s;\n" : "%s=%s; export %s;\n";
1303
		format = c_flag ? "setenv %s %s;\n" : "%s=%s; export %s;\n";
1297
		printf(format, SSH_AUTHSOCKET_ENV_NAME, socket_name,
1304
		printf(format, SSH_AUTHSOCKET_ENV_NAME, socket_name,
1298
		    SSH_AUTHSOCKET_ENV_NAME);
1305
		    SSH_AUTHSOCKET_ENV_NAME);
Lines 1364-1370 skip: Link Here
1364
		parent_alive_interval = 10;
1371
		parent_alive_interval = 10;
1365
	idtab_init();
1372
	idtab_init();
1366
	signal(SIGPIPE, SIG_IGN);
1373
	signal(SIGPIPE, SIG_IGN);
1367
	signal(SIGINT, d_flag ? cleanup_handler : SIG_IGN);
1374
	signal(SIGINT, (d_flag | D_flag) ? cleanup_handler : SIG_IGN);
1368
	signal(SIGHUP, cleanup_handler);
1375
	signal(SIGHUP, cleanup_handler);
1369
	signal(SIGTERM, cleanup_handler);
1376
	signal(SIGTERM, cleanup_handler);
1370
	nalloc = 0;
1377
	nalloc = 0;

Return to bug 2381