mount.cifs: set rc to 0 in libcap toggle_dac_capability
authorJeff Layton <jlayton@samba.org>
Thu, 14 Jun 2012 14:59:18 +0000 (10:59 -0400)
committerJeff Layton <jlayton@samba.org>
Thu, 14 Jun 2012 14:59:18 +0000 (10:59 -0400)
Thus spake Jochen:

The mount.cifs program from the cifs-utils package 5.5 did not work on
my Linux system. It just exited without an error message and did not
mount anything.

[...]

I think, when this variable rc is now used in this function, it has also
to be properly initialized there.

Reported-by: Jochen Roderburg <roderburg@uni-koeln.de>
Signed-off-by: Jeff Layton <jlayton@samba.org>
mount.cifs.c

index a1b045437bbaf15aae9904f175a0ea9eebd58691..6f3f3823a01e41cd35e663eafbda6d9d4cf7c263 100644 (file)
@@ -495,7 +495,7 @@ free_caps:
 static int
 toggle_dac_capability(int writable, int enable)
 {
-       int rc;
+       int rc = 0;
        cap_t caps;
        cap_value_t capability = writable ? CAP_DAC_OVERRIDE : CAP_DAC_READ_SEARCH;