summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-10-06 21:49:40 +0000
committerJeremy Allison <jra@samba.org>2003-10-06 21:49:40 +0000
commitf5aefbf7f84c211ee7c6aab874a4966821e4b87a (patch)
tree6b5a0f7a3894e57de497406a4b67d21fdc3e2396 /source3
parent629120a0a1ee0726cf6f43bf841ca042d2b0229e (diff)
downloadsamba-f5aefbf7f84c211ee7c6aab874a4966821e4b87a.tar.gz
samba-f5aefbf7f84c211ee7c6aab874a4966821e4b87a.tar.bz2
samba-f5aefbf7f84c211ee7c6aab874a4966821e4b87a.zip
Fix for bug #562 (incorrect mode sum) by h-yamasaki@pd.jp.nec.com.
Jeremy. (This used to be commit 7fb8a1bd3880b093a884749fc496cd702480752c)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/notify_hash.c6
1 files changed, 3 insertions, 3 deletions
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);