Date: Fri, 04 Mar 2022 06:14:55 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 262334] su(1) does not set correct argv[0] Message-ID: <bug-262334-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262334 Bug ID: 262334 Summary: su(1) does not set correct argv[0] Product: Base System Version: 13.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: rajeev_v_pillai@yahoo.com Created attachment 232243 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D232243&action= =3Dedit patch to set correct argv[0] in invoked shell su(1) does not set the correct argv[0]. It should set argv[0] corresponding= to the shell that will be invoked instead of always setting it to "su"/"-su"/"_su". $ su Password: root@x202e:/tmp # echo $0 su root@x202e:/tmp # ^D $ su -l Password: root@x202e:~ # echo $0 -su root@x202e:~ # ^D $=20 The attached patch sets argv[0] to "shell"/"-shell" according to the invoked shell. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-262334-227>