Skip to contentSkip to conversation

daemon/direct.c: check the return code from stat(2)

PATCH New Jeff Moyer 1 participant 1 message Sep 4, 2009 Kernel automounter

lore
Share & tools
lore

Jeff Moyer

author
#0 lore raw

PATCH 1/1 daemon/direct.c: check the return code from stat(2)

Another trivial patch.

Cheers,
Jeff

daemon/direct.c +1 -1
index 0c78627..9b4e57b 100644
@@ -1245,7 +1245,7 @@ static void *do_mount_direct(void *arg)
 	}
 
 	status = stat(mt.name, &st);
-	if (!S_ISDIR(st.st_mode) || st.st_dev != mt.dev) {
+	if (status != 0 || !S_ISDIR(st.st_mode) || st.st_dev != mt.dev) {
 		error(ap->logopt,
 		     "direct trigger not valid or already mounted %s",
 		     mt.name);