summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-01-29 18:22:39 +0000
committerSimo Sorce <idra@samba.org>2006-01-29 18:22:39 +0000
commit98e520c5f37fe9cbb57728c4b69081868674719a (patch)
treec79de749244fc26970f8b06b4bd811afafb27f34 /source
parentee25321fedacff1ab3f5aaccabc9bf2a3d0b836a (diff)
downloadsamba-98e520c5f37fe9cbb57728c4b69081868674719a.tar.gz
samba-98e520c5f37fe9cbb57728c4b69081868674719a.tar.xz
samba-98e520c5f37fe9cbb57728c4b69081868674719a.zip
r13222: Never assume mode_t is of type int.
We were trashing the stack on machines that define mode_t as uint16_t
Diffstat (limited to 'source')
-rw-r--r--source/modules/vfs_recycle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/modules/vfs_recycle.c b/source/modules/vfs_recycle.c
index 28593f4fbb7..188c50be3e5 100644
--- a/source/modules/vfs_recycle.c
+++ b/source/modules/vfs_recycle.c
@@ -166,13 +166,13 @@ static int recycle_maxsize(vfs_handle_struct *handle)
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;
}