aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-07 19:57:30 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-07 19:57:30 +0200
commita3c11d5022f2303768cd718f60894e69d0335649 (patch)
tree1d8a86a0091e2f2b37ca6aaae2e7c5b949a54c21 /src
parentfix warning in auth/pam (diff)
downloadcerberus-a3c11d5022f2303768cd718f60894e69d0335649.tar.gz
cerberus-a3c11d5022f2303768cd718f60894e69d0335649.tar.bz2
cerberus-a3c11d5022f2303768cd718f60894e69d0335649.tar.xz
fix warnings
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/login.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/login.c b/src/login.c
index 8bc5e05..9e84f45 100644
--- a/src/login.c
+++ b/src/login.c
@@ -70,7 +70,7 @@ void chdir_home(struct passwd* entry)
sleep(ERROR_SLEEP);
_exit(1);
}
- entry->pw_dir = DEFAULT_HOME;
+ entry->pw_dir = strdup(DEFAULT_HOME);
}
}
@@ -83,7 +83,7 @@ void chdir_home(struct passwd* entry)
void ensure_shell(struct passwd* entry)
{
if ((entry->pw_shell && *(entry->pw_shell)) == 0)
- entry->pw_shell = DEFAULT_SHELL;
+ entry->pw_shell = strdup(DEFAULT_SHELL);
}
@@ -167,9 +167,9 @@ void exec_shell(struct passwd* entry)
strcpy(login_sh, "exec ");
*(login_sh + n) = 0;
- *(child_argv + child_argc++) = DEFAULT_SHELL;
- *(child_argv + child_argc++) = "-" DEFAULT_SH;
- *(child_argv + child_argc++) = "-c";
+ *(child_argv + child_argc++) = strdup(DEFAULT_SHELL);
+ *(child_argv + child_argc++) = strdup("-" DEFAULT_SH);
+ *(child_argv + child_argc++) = strdup("-c");
*(child_argv + child_argc++) = login_sh - 5;
}
else