summaryrefslogtreecommitdiff
path: root/source3/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
commit882987594455c6676d0b01618d91bdbfc5e3b267 (patch)
tree337e4e0c37bf067e13f52827e6cd8d7bd37ec05a /source3/modules/vfs_afsacl.c
parentb059e2cbf1d6190c996a1ff6b8f426a493ae937c (diff)
downloadsamba-882987594455c6676d0b01618d91bdbfc5e3b267.tar.gz
samba-882987594455c6676d0b01618d91bdbfc5e3b267.tar.bz2
samba-882987594455c6676d0b01618d91bdbfc5e3b267.zip
Remove pstring from modules directory.
Jeremy. (This used to be commit 977dc3accb3d440e5fd19591c425da7dc3718d94)
Diffstat (limited to 'source3/modules/vfs_afsacl.c')
-rw-r--r--source3/modules/vfs_afsacl.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c
index eac70f4f20..3e57a88ed3 100644
--- a/source3/modules/vfs_afsacl.c
+++ b/source3/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", "%");