diff options
author | Simo Sorce <idra@samba.org> | 2006-01-29 18:22:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:06:18 -0500 |
commit | 6c58244def94a9e32d13a828040a2415ad9f7c57 (patch) | |
tree | d44d5c5ff8b5cf90c5f2eb4a1f6d54f54dea1bc1 | |
parent | 7ed3868780f72e00687cbd056109ef85ea2ea092 (diff) | |
download | samba-6c58244def94a9e32d13a828040a2415ad9f7c57.tar.gz samba-6c58244def94a9e32d13a828040a2415ad9f7c57.tar.bz2 samba-6c58244def94a9e32d13a828040a2415ad9f7c57.zip |
r13222: Never assume mode_t is of type int.
We were trashing the stack on machines that define mode_t as uint16_t
(This used to be commit 6c15af31bcee1e82578b61cae10423b37c285f10)
-rw-r--r-- | source3/modules/vfs_recycle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c index 28593f4fbb..188c50be3e 100644 --- a/source3/modules/vfs_recycle.c +++ b/source3/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; } |