Bugzilla – Attachment 366 Details for
Bug 623
ssh, ssh-keygen and possibly others do not honour $HOME (or ~ for that matter)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
_Dirty_ patch to allow non unique UIDs
not_unique_uids.diff (text/plain), 2.02 KB, created by
Kalin KOZHUHAROV
on 2003-08-10 03:14:06 AEST
(
hide
)
Description:
_Dirty_ patch to allow non unique UIDs
Filename:
MIME Type:
Creator:
Kalin KOZHUHAROV
Created:
2003-08-10 03:14:06 AEST
Size:
2.02 KB
patch
obsolete
>--- ./ssh.c 2003-02-24 09:57:32.000000000 +0900 >+++ /tmp/openssh-3.6.1p2/ssh.c 2003-08-10 01:25:29.000000000 +0900 >@@ -44,6 +44,7 @@ > > #include <openssl/evp.h> > #include <openssl/err.h> >+#include <stdlib.h> > > #include "ssh.h" > #include "ssh1.h" >@@ -221,6 +222,7 @@ > int dummy; > extern int optind, optreset; > extern char *optarg; >+ char *original_user_home_dir,*original_user_login; > > __progname = get_progname(av[0]); > init_rng(); >@@ -258,7 +260,12 @@ > } > /* Take a copy of the returned structure. */ > pw = pwcopy(pw); >- >+ original_user_home_dir=(char *)malloc(sizeof(char)*200); >+ original_user_login=(char *)malloc(sizeof(char)*200); >+ original_user_home_dir = getenv("HOME"); >+ original_user_login = getenv("LOGNAME"); >+ pw->pw_dir = xstrdup(original_user_home_dir); >+ pw->pw_name = xstrdup(original_user_login); > /* > * Set our umask to something reasonable, as some files are created > * with the default umask. This will make them world-readable but >--- ./tildexpand.c 2002-06-24 06:20:35.000000000 +0900 >+++ /tmp/openssh-3.6.1p2/tildexpand.c 2003-08-10 01:17:08.000000000 +0900 >@@ -13,6 +13,7 @@ > #include "includes.h" > RCSID("$OpenBSD: tildexpand.c,v 1.13 2002/06/23 03:25:50 deraadt Exp $"); > >+#include <stdlib.h> > #include "xmalloc.h" > #include "log.h" > #include "tildexpand.h" >@@ -30,6 +31,7 @@ > struct passwd *pw; > char user[100]; > int len; >+ char *original_user_home_dir,*original_user_login; > > /* Return immediately if no tilde. */ > if (filename[0] != '~') >@@ -45,7 +47,15 @@ > else > userlen = strlen(filename); /* Nothing after username. */ > if (userlen == 0) >+ { > pw = getpwuid(my_uid); /* Own home directory. */ >+ original_user_home_dir=(char *)malloc(sizeof(char)*200); >+ original_user_login=(char *)malloc(sizeof(char)*200); >+ original_user_home_dir = getenv("HOME"); >+ original_user_login = getenv("LOGNAME"); >+ pw->pw_dir = xstrdup(original_user_home_dir); >+ pw->pw_name = xstrdup(original_user_login); >+ } > else { > /* Tilde refers to someone elses home directory. */ > if (userlen > sizeof(user) - 1)
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 623
:
366
|
888