View | Details | Raw Unified | Return to bug 1632 | Differences between
and this patch

Collapse All | Expand All

(-)sftp-server.8 (+4 lines)
Lines 30-35 Link Here
30
.Nd SFTP server subsystem
30
.Nd SFTP server subsystem
31
.Sh SYNOPSIS
31
.Sh SYNOPSIS
32
.Nm sftp-server
32
.Nm sftp-server
33
.Op Fl u
33
.Op Fl f Ar log_facility
34
.Op Fl f Ar log_facility
34
.Op Fl l Ar log_level
35
.Op Fl l Ar log_level
35
.Sh DESCRIPTION
36
.Sh DESCRIPTION
Lines 54-59 Link Here
54
.Pp
55
.Pp
55
Valid options are:
56
Valid options are:
56
.Bl -tag -width Ds
57
.Bl -tag -width Ds
58
.It Fl u
59
Notifies the clients about the utf-8 encoding of the filenames with the
60
utf-8@openssh.com sftp extension.
57
.It Fl f Ar log_facility
61
.It Fl f Ar log_facility
58
Specifies the facility code that is used when logging messages from
62
Specifies the facility code that is used when logging messages from
59
.Nm .
63
.Nm .
(-)sftp-server.c (-1 / +12 lines)
Lines 70-75 Link Here
70
/* Version of client */
70
/* Version of client */
71
int version;
71
int version;
72
72
73
/* Tell the clients we're using utf8 */
74
int utf8_hint = 0;
75
73
/* portable attributes, etc. */
76
/* portable attributes, etc. */
74
77
75
typedef struct Stat Stat;
78
typedef struct Stat Stat;
Lines 532-537 Link Here
532
	/* fstatvfs extension */
535
	/* fstatvfs extension */
533
	buffer_put_cstring(&msg, "fstatvfs@openssh.com");
536
	buffer_put_cstring(&msg, "fstatvfs@openssh.com");
534
	buffer_put_cstring(&msg, "2"); /* version */
537
	buffer_put_cstring(&msg, "2"); /* version */
538
	if (utf8_hint) {
539
		/* utf-8 hint for sftp version 3 */
540
		buffer_put_cstring(&msg, "utf-8@openssh.com");
541
		buffer_put_cstring(&msg, "1"); /* version */
542
	}
535
	send_msg(&msg);
543
	send_msg(&msg);
536
	buffer_free(&msg);
544
	buffer_free(&msg);
537
}
545
}
Lines 1341-1347 Link Here
1341
	__progname = ssh_get_progname(argv[0]);
1349
	__progname = ssh_get_progname(argv[0]);
1342
	log_init(__progname, log_level, log_facility, log_stderr);
1350
	log_init(__progname, log_level, log_facility, log_stderr);
1343
1351
1344
	while (!skipargs && (ch = getopt(argc, argv, "f:l:che")) != -1) {
1352
	while (!skipargs && (ch = getopt(argc, argv, "f:l:cheu")) != -1) {
1345
		switch (ch) {
1353
		switch (ch) {
1346
		case 'c':
1354
		case 'c':
1347
			/*
1355
			/*
Lines 1349-1354 Link Here
1349
			 * shell using "sftp-server -c command"
1357
			 * shell using "sftp-server -c command"
1350
			 */
1358
			 */
1351
			skipargs = 1;
1359
			skipargs = 1;
1360
			break;
1361
		case 'u':
1362
			utf8_hint = 1;
1352
			break;
1363
			break;
1353
		case 'e':
1364
		case 'e':
1354
			log_stderr = 1;
1365
			log_stderr = 1;

Return to bug 1632