summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-10-06 21:49:42 +0000
committerJeremy Allison <jra@samba.org>2003-10-06 21:49:42 +0000
commitd7fba69c312a992616205e78dafd207dd194405b (patch)
tree43926ff11a70d897829abdde11100c56876e6716 /source3/smbd
parent03e7b224ec97f9a1da1ee818d05b9eadd7cf6de8 (diff)
downloadsamba-d7fba69c312a992616205e78dafd207dd194405b.tar.gz
samba-d7fba69c312a992616205e78dafd207dd194405b.tar.bz2
samba-d7fba69c312a992616205e78dafd207dd194405b.zip
Fix for bug #562 (incorrect mode sum) by h-yamasaki@pd.jp.nec.com.
Jeremy. (This used to be commit e2f4c3d113fb77b68858c67deff6b92deb311e16)
Diffstat (limited to 'source3/smbd')
-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);