svn commit: samba r13222 - in branches/SAMBA_3_0/source/modules: .

idra at samba.org idra at samba.org
Sun Jan 29 18:22:40 GMT 2006


Author: idra
Date: 2006-01-29 18:22:39 +0000 (Sun, 29 Jan 2006)
New Revision: 13222

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13222

Log:

Never assume mode_t is of type int.
We were trashing the stack on machines that define mode_t as uint16_t


Modified:
   branches/SAMBA_3_0/source/modules/vfs_recycle.c


Changeset:
Modified: branches/SAMBA_3_0/source/modules/vfs_recycle.c
===================================================================
--- branches/SAMBA_3_0/source/modules/vfs_recycle.c	2006-01-29 10:25:09 UTC (rev 13221)
+++ branches/SAMBA_3_0/source/modules/vfs_recycle.c	2006-01-29 18:22:39 UTC (rev 13222)
@@ -166,13 +166,13 @@
 
 static mode_t recycle_directory_mode(vfs_handle_struct *handle)
 {
-	mode_t dirmode;
+	int dirmode;
 	const char *buff;
 
 	buff = lp_parm_const_string(SNUM(handle->conn), "recycle", "directory_mode", NULL);
 
 	if (buff != NULL ) {
-		sscanf(buff, "%o", (int *)&dirmode);
+		sscanf(buff, "%o", &dirmode);
 	} else {
 		dirmode=S_IRUSR | S_IWUSR | S_IXUSR;
 	}



More information about the samba-cvs mailing list