sshfs: don't crash when no /etc/password file could be read on the remote side
in a cygwin environment, theres no /etc/passwd file to translate numeric uid/gid's. changing passwdparse() to ignore nil string argument.
This commit is contained in:
parent
f00488ec70
commit
51eaebf4f0
|
@ -1252,13 +1252,13 @@ out:
|
|||
void
|
||||
passwdparse(IDEnt **tab, char *s)
|
||||
{
|
||||
char *p;
|
||||
char *n;
|
||||
int id;
|
||||
IDEnt *e, **b;
|
||||
char *p, *n;
|
||||
int id;
|
||||
|
||||
p = s;
|
||||
for(;;){
|
||||
if(s == nil)
|
||||
return;
|
||||
for(p = s;;){
|
||||
n = p;
|
||||
p = strpbrk(p, ":\n"); if(p == nil) break; if(*p != ':'){ p++; continue; }
|
||||
*p = 0;
|
||||
|
|
Loading…
Reference in a new issue