summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-12-28 21:50:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:46 -0500
commit98c082489bec0a0ce4db1daf4390e785381f229a (patch)
treee0872d7bdb525991311bab54137208381a58c223 /source3/smbd/reply.c
parent143a364d6253125c27e229d533940a6822ce7575 (diff)
downloadsamba-98c082489bec0a0ce4db1daf4390e785381f229a.tar.gz
samba-98c082489bec0a0ce4db1daf4390e785381f229a.tar.bz2
samba-98c082489bec0a0ce4db1daf4390e785381f229a.zip
r20394: This is a *VERY* early start of my work on notify.
Checking in because Jeremy was bugging me. Potentially this becomes quite intrusive, I'm not sure if I should open a temporary branch for this. Jeremy, Jerry, do you think 3_0 is the right place for this? Volker (This used to be commit bcf5c751cbe203c00814642e26440cf88f300bce)
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index f6d5211310..f10b649bf1 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3860,7 +3860,7 @@ static BOOL recursive_rmdir(connection_struct *conn, char *directory)
The internals of the rmdir code - called elsewhere.
****************************************************************************/
-BOOL rmdir_internals(connection_struct *conn, char *directory)
+BOOL rmdir_internals(connection_struct *conn, const char *directory)
{
BOOL ok;
SMB_STRUCT_STAT st;
@@ -3933,10 +3933,25 @@ BOOL rmdir_internals(connection_struct *conn, char *directory)
}
}
- if (!ok)
- DEBUG(3,("rmdir_internals: couldn't remove directory %s : %s\n", directory,strerror(errno)));
+ if (!ok) {
+ DEBUG(3,("rmdir_internals: couldn't remove directory %s : "
+ "%s\n", directory,strerror(errno)));
+ return False;
+ }
+
+ {
+ char *parent_dir;
+ const char *dirname;
+
+ if (parent_dirname_talloc(tmp_talloc_ctx(), directory,
+ &parent_dir, &dirname)) {
+ notify_action(conn, parent_dir, dirname,
+ NOTIFY_ACTION_REMOVED);
+ TALLOC_FREE(parent_dir); /* Not strictly necessary */
+ }
+ }
- return ok;
+ return True;
}
/****************************************************************************