]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
system.3: Mention PATH explicitly in discussion of system and set-UID programs
authorMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 20 Nov 2017 13:56:13 +0000 (14:56 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 20 Nov 2017 14:00:56 +0000 (15:00 +0100)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/system.3

index eba51ac90de7898e6154599bce0a11caf04b7ef1..eaa7f9c331d065e3c9866676ea9c65ae71b98950 100644 (file)
@@ -207,12 +207,19 @@ Do not use
 from a program with set-user-ID or set-group-ID privileges,
 because strange values for some environment variables
 might be used to subvert system integrity.
+For example,
+.BR PATH
+could be manipulated so that an arbitrary program
+is executed with privilege.
 Use the
 .BR exec (3)
 family of functions instead, but not
 .BR execlp (3)
 or
-.BR execvp (3).
+.BR execvp (3)
+(which also use the
+.B PATH
+environment variable to search for an executable).
 .BR system ()
 will not, in fact, work properly from programs with set-user-ID or
 set-group-ID privileges on systems on which