Bugzilla – Attachment 1657 Details for
Bug 1615
the pathname length of home directory is limited to less than 256 chars
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
the patch version 2
openssh-5.2p1-pathmax.patch (text/plain), 1.40 KB, created by
jchadima
on 2009-07-02 00:33:18 AEST
(
hide
)
Description:
the patch version 2
Filename:
MIME Type:
Creator:
jchadima
Created:
2009-07-02 00:33:18 AEST
Size:
1.40 KB
patch
obsolete
>diff -up openssh-5.2p1/ssh.c.pathmax openssh-5.2p1/ssh.c >--- openssh-5.2p1/ssh.c.pathmax 2009-07-01 16:10:37.178203386 +0200 >+++ openssh-5.2p1/ssh.c 2009-07-01 16:28:56.259168592 +0200 >@@ -49,6 +49,7 @@ > #include <sys/resource.h> > #include <sys/ioctl.h> > #include <sys/socket.h> >+#include <sys/param.h> > > #include <ctype.h> > #include <errno.h> >@@ -209,7 +210,7 @@ int > main(int ac, char **av) > { > int i, opt, exit_status, use_syslog; >- char *p, *cp, *line, buf[256]; >+ char *p, *cp, *line, buf[PATH_MAX]; > struct stat st; > struct passwd *pw; > int dummy, timeout_ms; >@@ -624,8 +625,8 @@ main(int ac, char **av) > fatal("Can't open user config file %.100s: " > "%.100s", config, strerror(errno)); > } else { >- snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, >- _PATH_SSH_USER_CONFFILE); >+ snprintf(buf, sizeof buf, "%s%s%s", pw->pw_dir, >+ strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_CONFFILE); > (void)read_config_file(buf, host, &options, 1); > > /* Read systemwide configuration file after use config. */ >@@ -787,7 +788,7 @@ main(int ac, char **av) > * Now that we are back to our own permissions, create ~/.ssh > * directory if it doesn't already exist. > */ >- snprintf(buf, sizeof buf, "%.100s%s%.100s", pw->pw_dir, >+ snprintf(buf, sizeof buf, "%s%s%s", pw->pw_dir, > strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR); > if (stat(buf, &st) < 0) > if (mkdir(buf, 0700) < 0)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1615
:
1656
| 1657