diff options
author | Damien Miller <djm@mindrot.org> | 1999-11-25 11:54:57 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-11-25 11:54:57 +1100 |
commit | 5428f646ad32da88ddd04a8c287d595524674fbf (patch) | |
tree | cc1f1e5d7852e1f44d41077f776abf7dab7ac06d /tildexpand.c | |
parent | 9072e1889648988da38b7b81bce95291c1dc3a23 (diff) |
- More reformatting merged from OpenBSD CVS
- Merged OpenBSD CVS changes:
- [channels.c]
report from mrwizard@psu.edu via djm@ibs.com.au
- [channels.c]
set SO_REUSEADDR and SO_LINGER for forwarded ports.
chip@valinux.com via damien@ibs.com.au
- [nchan.c]
it's not an error() if shutdown_write failes in nchan.
- [readconf.c]
remove dead #ifdef-0-code
- [readconf.c servconf.c]
strcasecmp instead of tolower
- [scp.c]
progress meter overflow fix from damien@ibs.com.au
- [ssh-add.1 ssh-add.c]
SSH_ASKPASS support
- [ssh.1 ssh.c]
postpone fork_after_authentication until command execution,
request/patch from jahakala@cc.jyu.fi via damien@ibs.com.au
plus: use daemon() for backgrounding
Diffstat (limited to 'tildexpand.c')
-rw-r--r-- | tildexpand.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tildexpand.c b/tildexpand.c index 92422ee3..8ee551f1 100644 --- a/tildexpand.c +++ b/tildexpand.c @@ -6,7 +6,7 @@ */ #include "includes.h" -RCSID("$Id: tildexpand.c,v 1.2 1999/11/24 13:26:23 damien Exp $"); +RCSID("$Id: tildexpand.c,v 1.3 1999/11/25 00:54:59 damien Exp $"); #include "xmalloc.h" #include "ssh.h" @@ -38,7 +38,7 @@ tilde_expand_filename(const char *filename, uid_t my_uid) else userlen = strlen(filename); /* Nothing after username. */ if (userlen == 0) - pw = getpwuid(my_uid); /* Own home directory. */ + pw = getpwuid(my_uid); /* Own home directory. */ else { /* Tilde refers to someone elses home directory. */ if (userlen > sizeof(user) - 1) @@ -47,12 +47,12 @@ tilde_expand_filename(const char *filename, uid_t my_uid) user[userlen] = 0; pw = getpwnam(user); } - /* Check that we found the user. */ if (!pw) fatal("Unknown user %100s.", user); /* If referring to someones home directory, return it now. */ - if (!cp) { /* Only home directory specified */ + if (!cp) { + /* Only home directory specified */ return xstrdup(pw->pw_dir); } /* Build a path combining the specified directory and path. */ |