1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

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 6c15af31bc)
This commit is contained in:
Simo Sorce 2006-01-29 18:22:39 +00:00 committed by Gerald (Jerry) Carter
parent 7ed3868780
commit 6c58244def

View File

@ -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;
}