diff options
author | Volker Lendecke <vl@samba.org> | 2008-12-24 13:51:47 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-12-31 19:33:25 +0100 |
commit | 972295f80a96e3928be426edf607cbdd3990a2d9 (patch) | |
tree | 0142539debab9528d7b0d8ab82cb62b2e4de4183 | |
parent | 9b79181f1508b8a126a48511232205abe456e923 (diff) | |
download | samba-972295f80a96e3928be426edf607cbdd3990a2d9.tar.gz samba-972295f80a96e3928be426edf607cbdd3990a2d9.tar.bz2 samba-972295f80a96e3928be426edf607cbdd3990a2d9.zip |
Rename parent_dirname_talloc() to parent_dirname()
-rw-r--r-- | source3/include/proto.h | 4 | ||||
-rw-r--r-- | source3/lib/util.c | 4 | ||||
-rw-r--r-- | source3/modules/onefs_open.c | 6 | ||||
-rw-r--r-- | source3/modules/vfs_acl_tdb.c | 5 | ||||
-rw-r--r-- | source3/modules/vfs_acl_xattr.c | 5 | ||||
-rw-r--r-- | source3/modules/vfs_default.c | 2 | ||||
-rw-r--r-- | source3/smbd/file_access.c | 5 | ||||
-rw-r--r-- | source3/smbd/nttrans.c | 2 | ||||
-rw-r--r-- | source3/smbd/open.c | 6 | ||||
-rw-r--r-- | source3/smbd/posix_acls.c | 5 | ||||
-rw-r--r-- | source3/smbd/reply.c | 4 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 3 |
12 files changed, 17 insertions, 34 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 437a1d545a..be34bb0e65 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1230,8 +1230,8 @@ char *modules_path(const char *name); char *data_path(const char *name); char *state_path(const char *name); const char *shlib_ext(void); -bool parent_dirname_talloc(TALLOC_CTX *mem_ctx, const char *dir, - char **parent, const char **name); +bool parent_dirname(TALLOC_CTX *mem_ctx, const char *dir, char **parent, + const char **name); bool ms_has_wild(const char *s); bool ms_has_wild_w(const smb_ucs2_t *s); bool mask_match(const char *string, const char *pattern, bool is_case_sensitive); diff --git a/source3/lib/util.c b/source3/lib/util.c index 2c4cd20f31..d00a764c1d 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -2334,8 +2334,8 @@ const char *shlib_ext(void) Given a filename - get its directory name ********************************************************************/ -bool parent_dirname_talloc(TALLOC_CTX *mem_ctx, const char *dir, - char **parent, const char **name) +bool parent_dirname(TALLOC_CTX *mem_ctx, const char *dir, char **parent, + const char **name) { char *p; ptrdiff_t len; diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c index d0310d0174..a4a317d905 100644 --- a/source3/modules/onefs_open.c +++ b/source3/modules/onefs_open.c @@ -462,8 +462,7 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn, return print_fsp_open(req, conn, fname, req->vuid, fsp); } - if (!parent_dirname_talloc(talloc_tos(), fname, &parent_dir, - &newname)) { + if (!parent_dirname(talloc_tos(), fname, &parent_dir, &newname)) { return NT_STATUS_NO_MEMORY; } @@ -1339,8 +1338,7 @@ static NTSTATUS onefs_open_directory(connection_struct *conn, } /* Get parent dirname */ - if (!parent_dirname_talloc(talloc_tos(), fname, &parent_dir, - &dirname)) { + if (!parent_dirname(talloc_tos(), fname, &parent_dir, &dirname)) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c index 9cb887ae51..3d140e34c2 100644 --- a/source3/modules/vfs_acl_tdb.c +++ b/source3/modules/vfs_acl_tdb.c @@ -433,10 +433,7 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle, size_t size; char *parent_name; - if (!parent_dirname_talloc(ctx, - fname, - &parent_name, - NULL)) { + if (!parent_dirname(ctx, fname, &parent_name, NULL)) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c index 3c8f241ad9..7c78b506f0 100644 --- a/source3/modules/vfs_acl_xattr.c +++ b/source3/modules/vfs_acl_xattr.c @@ -328,10 +328,7 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle, size_t size; char *parent_name; - if (!parent_dirname_talloc(ctx, - fname, - &parent_name, - NULL)) { + if (!parent_dirname(ctx, fname, &parent_name, NULL)) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 3171d3c5ca..61e1deb81e 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -155,7 +155,7 @@ static int vfswrap_mkdir(vfs_handle_struct *handle, const char *path, mode_t mo START_PROFILE(syscall_mkdir); if (lp_inherit_acls(SNUM(handle->conn)) - && parent_dirname_talloc(talloc_tos(), path, &parent, NULL) + && parent_dirname(talloc_tos(), path, &parent, NULL) && (has_dacl = directory_has_default_acl(handle->conn, parent))) mode = 0777; diff --git a/source3/smbd/file_access.c b/source3/smbd/file_access.c index c535bc7fd8..d44e63a89a 100644 --- a/source3/smbd/file_access.c +++ b/source3/smbd/file_access.c @@ -66,10 +66,7 @@ bool can_delete_file_in_directory(connection_struct *conn, const char *fname) } /* Get the parent directory permission mask and owners. */ - if (!parent_dirname_talloc(ctx, - fname, - &dname, - NULL)) { + if (!parent_dirname(ctx, fname, &dname, NULL)) { return False; } if(SMB_VFS_STAT(conn, dname, &sbuf) != 0) { diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index c9874f6a48..9bfc566410 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1256,7 +1256,7 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx, /* Grrr. We have to do this as open_file_ntcreate adds aARCH when it creates the file. This isn't the correct thing to do in the copy case. JRA */ - if (!parent_dirname_talloc(talloc_tos(), newname, &parent, NULL)) { + if (!parent_dirname(talloc_tos(), newname, &parent, NULL)) { return NT_STATUS_NO_MEMORY; } file_set_dosmode(conn, newname, fattr, &sbuf2, parent, false); diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 8fe20f9cca..03d994f083 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1363,8 +1363,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, return print_fsp_open(req, conn, fname, req->vuid, fsp, psbuf); } - if (!parent_dirname_talloc(talloc_tos(), fname, &parent_dir, - &newname)) { + if (!parent_dirname(talloc_tos(), fname, &parent_dir, &newname)) { return NT_STATUS_NO_MEMORY; } @@ -2190,8 +2189,7 @@ static NTSTATUS mkdir_internal(connection_struct *conn, return status; } - if (!parent_dirname_talloc(talloc_tos(), name, &parent_dir, - &dirname)) { + if (!parent_dirname(talloc_tos(), name, &parent_dir, &dirname)) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index b184279259..8fe7a9abe9 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -3241,10 +3241,7 @@ NTSTATUS append_parent_acl(files_struct *fsp, return NT_STATUS_NO_MEMORY; } - if (!parent_dirname_talloc(mem_ctx, - fsp->fsp_name, - &parent_name, - NULL)) { + if (!parent_dirname(mem_ctx, fsp->fsp_name, &parent_name, NULL)) { return NT_STATUS_NO_MEMORY; } diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 8f9edfe0ca..2133a30dc6 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -5396,8 +5396,8 @@ static void notify_rename(connection_struct *conn, bool is_dir, mask = is_dir ? FILE_NOTIFY_CHANGE_DIR_NAME : FILE_NOTIFY_CHANGE_FILE_NAME; - if (!parent_dirname_talloc(NULL, oldpath, &olddir, &oldname) - || !parent_dirname_talloc(NULL, newpath, &newdir, &newname)) { + if (!parent_dirname(talloc_tos(), oldpath, &olddir, &oldname) + || !parent_dirname(talloc_tos(), newpath, &newdir, &newname)) { TALLOC_FREE(olddir); return; } diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index abc5888ba0..5abfffd618 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -5983,8 +5983,7 @@ static NTSTATUS smb_unix_mknod(connection_struct *conn, if (lp_inherit_perms(SNUM(conn))) { char *parent; - if (!parent_dirname_talloc(talloc_tos(), fname, &parent, - NULL)) { + if (!parent_dirname(talloc_tos(), fname, &parent, NULL)) { return NT_STATUS_NO_MEMORY; } inherit_access_posix_acl(conn, parent, fname, unixmode); |