File: chown

package info (click to toggle)
autodir 0.99.9-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,120 kB
  • sloc: sh: 8,333; ansic: 7,615; xml: 426; makefile: 71
file content (15 lines) | stat: -rw-r--r-- 437 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Description: A missing check for a chown() could be oversight
From: Francesco Paolo Lovergine <frankie@debian.org>
Forwarded-upstream: no

--- a/src/modules/autohome.c
+++ b/src/modules/autohome.c
@@ -646,7 +646,7 @@
 			else
 			{
 				copy_skel_dir( sdent, ddent, &sdent_st, uid, gid );
-				chown( ddent, uid, gid );
+				if ( chown( ddent, uid, gid ) ) return 0;
 			}
 		}
 		else msglog( MSG_WARNING, "copy_skel_dir: %s is not " \