summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--sftp-server.c11
2 files changed, 15 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c0b462d9..a6d3db544 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,9 @@
120010525 120010525
2 - OpenBSD CVS Sync 2 - OpenBSD CVS Sync
3 - markus@cvs.openbsd.org 2001/06/21 21:08:25 3 - markus@cvs.openbsd.org 2001/06/21 21:08:25
4 [session.c] 4 [session.c]
5 don't reset forced_command (we allow multiple login shells in 5 don't reset forced_command (we allow multiple login shells in
6 ssh2); dwd@bell-labs.com 6 ssh2); dwd@bell-labs.com
7 - mpech@cvs.openbsd.org 2001/06/22 10:17:51 7 - mpech@cvs.openbsd.org 2001/06/22 10:17:51
8 [ssh.1 sshd.8 ssh-keyscan.1] 8 [ssh.1 sshd.8 ssh-keyscan.1]
9 o) .Sh AUTHOR -> .Sh AUTHORS; 9 o) .Sh AUTHOR -> .Sh AUTHORS;
@@ -29,6 +29,9 @@
29 [dh.c] 29 [dh.c]
30 increase linebuffer to deal with larger moduli; use rewind instead of 30 increase linebuffer to deal with larger moduli; use rewind instead of
31 close/open 31 close/open
32 - markus@cvs.openbsd.org 2001/06/22 22:21:20
33 [sftp-server.c]
34 allow long usernames/groups in readdir
32 35
3320010622 3620010622
34 - (stevesk) handle systems without pw_expire and pw_change. 37 - (stevesk) handle systems without pw_expire and pw_change.
@@ -5713,4 +5716,4 @@
5713 - Wrote replacements for strlcpy and mkdtemp 5716 - Wrote replacements for strlcpy and mkdtemp
5714 - Released 1.0pre1 5717 - Released 1.0pre1
5715 5718
5716$Id: ChangeLog,v 1.1303 2001/06/25 04:18:59 mouring Exp $ 5719$Id: ChangeLog,v 1.1304 2001/06/25 04:24:49 mouring Exp $
diff --git a/sftp-server.c b/sftp-server.c
index 1cbd1847c..ab6291e61 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -22,7 +22,7 @@
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 23 */
24#include "includes.h" 24#include "includes.h"
25RCSID("$OpenBSD: sftp-server.c,v 1.26 2001/05/12 19:53:13 markus Exp $"); 25RCSID("$OpenBSD: sftp-server.c,v 1.27 2001/06/22 22:21:20 markus Exp $");
26 26
27#include "buffer.h" 27#include "buffer.h"
28#include "bufaux.h" 28#include "bufaux.h"
@@ -692,7 +692,7 @@ process_opendir(void)
692char * 692char *
693ls_file(char *name, struct stat *st) 693ls_file(char *name, struct stat *st)
694{ 694{
695 int sz = 0; 695 int ulen, glen, sz = 0;
696 struct passwd *pw; 696 struct passwd *pw;
697 struct group *gr; 697 struct group *gr;
698 struct tm *ltime = localtime(&st->st_mtime); 698 struct tm *ltime = localtime(&st->st_mtime);
@@ -720,8 +720,11 @@ ls_file(char *name, struct stat *st)
720 } 720 }
721 if (sz == 0) 721 if (sz == 0)
722 tbuf[0] = '\0'; 722 tbuf[0] = '\0';
723 snprintf(buf, sizeof buf, "%s %3d %-8.8s %-8.8s %8llu %s %s", mode, 723 ulen = MAX(strlen(user), 8);
724 st->st_nlink, user, group, (u_int64_t)st->st_size, tbuf, name); 724 glen = MAX(strlen(group), 8);
725 snprintf(buf, sizeof buf, "%s %3d %-*s %-*s %8llu %s %s", mode,
726 st->st_nlink, ulen, user, glen, group,
727 (u_int64_t)st->st_size, tbuf, name);
725 return xstrdup(buf); 728 return xstrdup(buf);
726} 729}
727 730