diff options
author | Volker Lendecke <vl@samba.org> | 2012-03-15 13:02:15 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-03-16 14:28:42 +0100 |
commit | 8503eecabb9cbd47db6167f7394dc2257714ebd9 (patch) | |
tree | 02953fadb5e83c1b5faf488209ff6670d37d3499 /source3/smbd/notify_internal.c | |
parent | 640a7d0db71e038223a2f5afed70c5df5db509ac (diff) | |
download | samba-8503eecabb9cbd47db6167f7394dc2257714ebd9.tar.gz samba-8503eecabb9cbd47db6167f7394dc2257714ebd9.tar.bz2 samba-8503eecabb9cbd47db6167f7394dc2257714ebd9.zip |
s3-notify: Lift "/." handling up one level
This slightly simplifies the code
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Mar 16 14:28:44 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd/notify_internal.c')
-rw-r--r-- | source3/smbd/notify_internal.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c index 599c994169..906f7674de 100644 --- a/source3/smbd/notify_internal.c +++ b/source3/smbd/notify_internal.c @@ -511,9 +511,7 @@ NTSTATUS notify_add(struct notify_context *notify, struct notify_entry *e0, { struct notify_entry e = *e0; NTSTATUS status; - char *tmp_path = NULL; struct notify_list *listel; - size_t len; int depth; /* see if change notify is enabled at all */ @@ -521,17 +519,6 @@ NTSTATUS notify_add(struct notify_context *notify, struct notify_entry *e0, return NT_STATUS_NOT_IMPLEMENTED; } - /* cope with /. on the end of the path */ - len = strlen(e.path); - if (len > 1 && e.path[len-1] == '.' && e.path[len-2] == '/') { - tmp_path = talloc_strndup(notify, e.path, len-2); - if (tmp_path == NULL) { - status = NT_STATUS_NO_MEMORY; - goto done; - } - e.path = tmp_path; - } - depth = count_chars(e.path, '/'); listel = talloc_zero(notify, struct notify_list); @@ -586,8 +573,6 @@ NTSTATUS notify_add(struct notify_context *notify, struct notify_entry *e0, } status = NT_STATUS_OK; done: - talloc_free(tmp_path); - return status; } |