]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
login: duplicate --shell argument to avoid nulling through explicit_bzero()
authorChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Thu, 4 Dec 2025 17:02:30 +0000 (12:02 -0500)
committerChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Thu, 4 Dec 2025 17:05:03 +0000 (12:05 -0500)
Addresses: #3855
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
login-utils/login.c

index 3cd1d528bed6ce93d017a9f5697cfa94b4dd20e1..604d63c235b61aa5dc587296c6decfa382fb3a1f 100644 (file)
@@ -1384,7 +1384,7 @@ static void initialize(int argc, char **argv, struct login_context *cxt)
                        break;
 
                case 's':
-                       cxt->shell_arg = optarg;
+                       cxt->shell_arg = xstrdup(optarg);
                        break;
 
                case 'V':