diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source3/modules/vfs_recycle.c | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2 samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/modules/vfs_recycle.c')
-rw-r--r-- | source3/modules/vfs_recycle.c | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c index 22f61b4b33..5c4f8706cb 100644 --- a/source3/modules/vfs_recycle.c +++ b/source3/modules/vfs_recycle.c @@ -35,33 +35,9 @@ static int vfs_recycle_debug_level = DBGC_VFS; #undef DBGC_CLASS #define DBGC_CLASS vfs_recycle_debug_level -static int recycle_connect(vfs_handle_struct *handle, const char *service, const char *user); -static void recycle_disconnect(vfs_handle_struct *handle); static int recycle_unlink(vfs_handle_struct *handle, const struct smb_filename *smb_fname); -static int recycle_connect(vfs_handle_struct *handle, const char *service, const char *user) -{ - int ret = SMB_VFS_NEXT_CONNECT(handle, service, user); - - if (ret < 0) { - return ret; - } - - DEBUG(10,("recycle_connect() connect to service[%s] as user[%s].\n", - service,user)); - - return 0; -} - -static void recycle_disconnect(vfs_handle_struct *handle) -{ - DEBUG(10,("recycle_disconnect() connect to service[%s].\n", - lp_servicename(SNUM(handle->conn)))); - - SMB_VFS_NEXT_DISCONNECT(handle); -} - static const char *recycle_repository(vfs_handle_struct *handle) { const char *tmp_str = NULL; @@ -304,13 +280,13 @@ static bool recycle_create_dir(vfs_handle_struct *handle, const char *dname) *new_dir = '\0'; if (dname[0] == '/') { /* Absolute path. */ - safe_strcat(new_dir,"/",len); + strlcat(new_dir,"/",len+1); } /* Create directory tree if neccessary */ for(token = strtok_r(tok_str, "/", &saveptr); token; token = strtok_r(NULL, "/", &saveptr)) { - safe_strcat(new_dir, token, len); + strlcat(new_dir, token, len+1); if (recycle_directory_exist(handle, new_dir)) DEBUG(10, ("recycle: dir %s already exists\n", new_dir)); else { @@ -321,7 +297,7 @@ static bool recycle_create_dir(vfs_handle_struct *handle, const char *dname) goto done; } } - safe_strcat(new_dir, "/", len); + strlcat(new_dir, "/", len+1); mode = recycle_subdir_mode(handle); } @@ -663,8 +639,6 @@ done: } static struct vfs_fn_pointers vfs_recycle_fns = { - .connect_fn = recycle_connect, - .disconnect = recycle_disconnect, .unlink = recycle_unlink }; |