summaryrefslogtreecommitdiffstats
path: root/source/modules/vfs_afsacl.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-16 17:07:11 -0800
committerJeremy Allison <jra@samba.org>2007-11-16 17:07:11 -0800
commit977dc3accb3d440e5fd19591c425da7dc3718d94 (patch)
tree9dec9cb510fc696ba0f49b29b437c0aadf9fe3d2 /source/modules/vfs_afsacl.c
parenta90ef69350c5efcf8dcf95d4853cbe3c662d1ba3 (diff)
downloadsamba-977dc3accb3d440e5fd19591c425da7dc3718d94.tar.gz
samba-977dc3accb3d440e5fd19591c425da7dc3718d94.tar.xz
samba-977dc3accb3d440e5fd19591c425da7dc3718d94.zip
Remove pstring from modules directory.
Jeremy.
Diffstat (limited to 'source/modules/vfs_afsacl.c')
-rw-r--r--source/modules/vfs_afsacl.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source/modules/vfs_afsacl.c b/source/modules/vfs_afsacl.c
index eac70f4f208..3e57a88ed36 100644
--- a/source/modules/vfs_afsacl.c
+++ b/source/modules/vfs_afsacl.c
@@ -891,7 +891,7 @@ static NTSTATUS afs_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
char acl_string[2049];
struct afs_iob iob;
int ret = -1;
- pstring name;
+ char *name = NULL;
const char *fileacls;
fileacls = lp_parm_const_string(SNUM(handle->conn), "afsacl", "fileacls",
@@ -904,7 +904,10 @@ static NTSTATUS afs_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
ZERO_STRUCT(dir_acl);
ZERO_STRUCT(file_acl);
- pstrcpy(name, fsp->fsp_name);
+ name = talloc_strdup(talloc_tos(), fsp->fsp_name);
+ if (!name) {
+ return NT_STATUS_NO_MEMORY;
+ }
if (!fsp->is_directory) {
/* We need to get the name of the directory containing the
@@ -913,7 +916,10 @@ static NTSTATUS afs_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
if (p != NULL) {
*p = '\0';
} else {
- pstrcpy(name, ".");
+ name = talloc_strdup(talloc_tos(), ".");
+ if (!name) {
+ return NT_STATUS_NO_MEMORY;
+ }
}
}
@@ -1017,7 +1023,7 @@ static int afsacl_connect(vfs_handle_struct *handle,
const char *service,
const char *user)
{
- const char *spc;
+ const char *spc;
spc = lp_parm_const_string(SNUM(handle->conn), "afsacl", "space", "%");