From 6c58244def94a9e32d13a828040a2415ad9f7c57 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 29 Jan 2006 18:22:39 +0000 Subject: 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) --- source3/modules/vfs_recycle.c | 4 ++-- 1 file 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; } -- cgit