diff options
author | Manuel Bentele | 2019-08-21 14:58:42 +0200 |
---|---|---|
committer | Manuel Bentele | 2019-08-21 14:58:42 +0200 |
commit | 0692b963aa3cb846d8abab5ef5247c4dbb3fec96 (patch) | |
tree | f13776d25da3e1adc1445aef22e7566ac98cbe84 /login-utils/login.c | |
parent | losetup: added file format option to the man page (diff) | |
parent | partx: document -d vs. --nr and fix test (diff) | |
download | kernel-qcow2-util-linux-0692b963aa3cb846d8abab5ef5247c4dbb3fec96.tar.gz kernel-qcow2-util-linux-0692b963aa3cb846d8abab5ef5247c4dbb3fec96.tar.xz kernel-qcow2-util-linux-0692b963aa3cb846d8abab5ef5247c4dbb3fec96.zip |
lib/losetup: merge remote-tracking branch 'util-linux/master'kernel-qcow2
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
Diffstat (limited to 'login-utils/login.c')
-rw-r--r-- | login-utils/login.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/login-utils/login.c b/login-utils/login.c index ce112b54e..6b9d27e3e 100644 --- a/login-utils/login.c +++ b/login-utils/login.c @@ -1355,10 +1355,7 @@ int main(int argc, char **argv) /* if the shell field has a space: treat it like a shell script */ if (strchr(pwd->pw_shell, ' ')) { - buff = xmalloc(strlen(pwd->pw_shell) + 6); - - strcpy(buff, "exec "); - strcat(buff, pwd->pw_shell); + xasprintf(&buff, "exec %s", pwd->pw_shell); childArgv[childArgc++] = "/bin/sh"; childArgv[childArgc++] = "-sh"; childArgv[childArgc++] = "-c"; |