From d7fba69c312a992616205e78dafd207dd194405b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 6 Oct 2003 21:49:42 +0000 Subject: Fix for bug #562 (incorrect mode sum) by h-yamasaki@pd.jp.nec.com. Jeremy. (This used to be commit e2f4c3d113fb77b68858c67deff6b92deb311e16) --- source3/smbd/notify_hash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/smbd/notify_hash.c b/source3/smbd/notify_hash.c index 810e5079ba..ec414454f9 100644 --- a/source3/smbd/notify_hash.c +++ b/source3/smbd/notify_hash.c @@ -41,7 +41,7 @@ static BOOL notify_hash(connection_struct *conn, char *path, uint32 flags, SMB_STRUCT_STAT st; pstring full_name; char *p; - char *fname; + const char *fname; size_t remaining_len; size_t fullname_len; void *dp; @@ -115,7 +115,7 @@ static BOOL notify_hash(connection_struct *conn, char *path, uint32 flags, if (flags & (FILE_NOTIFY_CHANGE_DIR_NAME|FILE_NOTIFY_CHANGE_FILE_NAME|FILE_NOTIFY_CHANGE_FILE)) { int i; unsigned char tmp_hash[16]; - mdfour(tmp_hash, (unsigned char *)fname, strlen(fname)); + mdfour(tmp_hash, (const unsigned char *)fname, strlen(fname)); for (i=0;i<16;i++) data->name_hash[i] ^= tmp_hash[i]; } @@ -125,7 +125,7 @@ static BOOL notify_hash(connection_struct *conn, char *path, uint32 flags, */ if (flags & (FILE_NOTIFY_CHANGE_ATTRIBUTES|FILE_NOTIFY_CHANGE_SECURITY)) - data->mode_sum = st.st_mode; + data->mode_sum += st.st_mode; } CloseDir(dp); -- cgit