merge strcpy_truncate branch
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5027 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -89,10 +89,10 @@ ftp_rooted(const char *path)
|
||||
|
||||
if(!home[0])
|
||||
if((pwd = k_getpwnam("ftp")))
|
||||
strcpy(home, pwd->pw_dir);
|
||||
strcpy_truncate(home, pwd->pw_dir, sizeof(home));
|
||||
snprintf(newpath, sizeof(newpath), "%s/%s", home, path);
|
||||
if(access(newpath, X_OK))
|
||||
strcpy(newpath, path);
|
||||
strcpy_truncate(newpath, path, sizeof(newpath));
|
||||
return newpath;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user