add comments to fsetupcmd init
This commit is contained in:
parent
e37d784eca
commit
abfce62c10
|
|
@ -75,11 +75,16 @@ int main (int argc, char ** argv)
|
||||||
char *log;
|
char *log;
|
||||||
struct passwd *pw=0L;
|
struct passwd *pw=0L;
|
||||||
struct fsp_host *setup=NULL;
|
struct fsp_host *setup=NULL;
|
||||||
|
|
||||||
|
/* Determine user home directory, try to use password file first
|
||||||
|
fallback to $HOME.
|
||||||
|
*/
|
||||||
log = (char *)getlogin();
|
log = (char *)getlogin();
|
||||||
if (log) pw = getpwnam(log);
|
if (log) pw = getpwnam(log);
|
||||||
if (!pw) pw = getpwuid(getuid());
|
if (!pw) pw = getpwuid(getuid());
|
||||||
if (pw) {
|
if (pw) {
|
||||||
|
/* Load default shell type from password file. We will check
|
||||||
|
for $SHELL later */
|
||||||
csh = !strcmp(pw->pw_shell + strlen(pw->pw_shell) - 3, "csh");
|
csh = !strcmp(pw->pw_shell + strlen(pw->pw_shell) - 3, "csh");
|
||||||
home = pw->pw_dir; /* for default search for file .fspsites */
|
home = pw->pw_dir; /* for default search for file .fspsites */
|
||||||
} else
|
} else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user