summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-27 07:08:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:15 -0500
commit759da3b915e2006d4c87b5ace47f399accd9ce91 (patch)
tree6bcaf9d4c0e38ef5e975c041d442c4437aa61e5a /source4/ntvfs/posix
parent1e42cacf6a8643bd633f631c212d71760852abbc (diff)
downloadsamba-759da3b915e2006d4c87b5ace47f399accd9ce91.tar.gz
samba-759da3b915e2006d4c87b5ace47f399accd9ce91.tar.bz2
samba-759da3b915e2006d4c87b5ace47f399accd9ce91.zip
r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/pvfs_acl.c8
-rw-r--r--source4/ntvfs/posix/pvfs_dirlist.c2
-rw-r--r--source4/ntvfs/posix/pvfs_lock.c2
-rw-r--r--source4/ntvfs/posix/pvfs_open.c14
-rw-r--r--source4/ntvfs/posix/pvfs_qfileinfo.c8
-rw-r--r--source4/ntvfs/posix/pvfs_resolve.c10
-rw-r--r--source4/ntvfs/posix/pvfs_search.c6
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c4
-rw-r--r--source4/ntvfs/posix/pvfs_shortname.c4
-rw-r--r--source4/ntvfs/posix/pvfs_streams.c12
-rw-r--r--source4/ntvfs/posix/pvfs_wait.c2
-rw-r--r--source4/ntvfs/posix/vfs_posix.c2
-rw-r--r--source4/ntvfs/posix/xattr_tdb.c4
13 files changed, 39 insertions, 39 deletions
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c
index e38f2c9ecb..c2856ad292 100644
--- a/source4/ntvfs/posix/pvfs_acl.c
+++ b/source4/ntvfs/posix/pvfs_acl.c
@@ -195,7 +195,7 @@ NTSTATUS pvfs_acl_set(struct pvfs_state *pvfs,
uid_t uid = -1;
gid_t gid = -1;
- acl = talloc_p(req, struct xattr_NTACL);
+ acl = talloc(req, struct xattr_NTACL);
if (acl == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -289,7 +289,7 @@ NTSTATUS pvfs_acl_query(struct pvfs_state *pvfs,
NTSTATUS status;
struct security_descriptor *sd;
- acl = talloc_p(req, struct xattr_NTACL);
+ acl = talloc(req, struct xattr_NTACL);
if (acl == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -367,7 +367,7 @@ NTSTATUS pvfs_access_check(struct pvfs_state *pvfs,
NTSTATUS status;
struct security_descriptor *sd;
- acl = talloc_p(req, struct xattr_NTACL);
+ acl = talloc(req, struct xattr_NTACL);
if (acl == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -595,7 +595,7 @@ NTSTATUS pvfs_acl_inherit(struct pvfs_state *pvfs,
return status;
}
- acl = talloc_p(req, struct xattr_NTACL);
+ acl = talloc(req, struct xattr_NTACL);
if (acl == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_dirlist.c b/source4/ntvfs/posix/pvfs_dirlist.c
index c2e8f826a2..1b60f17462 100644
--- a/source4/ntvfs/posix/pvfs_dirlist.c
+++ b/source4/ntvfs/posix/pvfs_dirlist.c
@@ -97,7 +97,7 @@ NTSTATUS pvfs_list_start(struct pvfs_state *pvfs, struct pvfs_filename *name,
char *pattern;
struct pvfs_dir *dir;
- (*dirp) = talloc_zero_p(mem_ctx, struct pvfs_dir);
+ (*dirp) = talloc_zero(mem_ctx, struct pvfs_dir);
if (*dirp == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c
index 74ee48ba15..6ad654f505 100644
--- a/source4/ntvfs/posix/pvfs_lock.c
+++ b/source4/ntvfs/posix/pvfs_lock.c
@@ -296,7 +296,7 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs,
if (lck->lockx.in.timeout != 0 &&
(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
- pending = talloc_p(f, struct pvfs_pending_lock);
+ pending = talloc(f, struct pvfs_pending_lock);
if (pending == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index b34d75d24d..ae8841e7b5 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -180,12 +180,12 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
return NT_STATUS_INVALID_PARAMETER;
}
- f = talloc_p(req, struct pvfs_file);
+ f = talloc(req, struct pvfs_file);
if (f == NULL) {
return NT_STATUS_NO_MEMORY;
}
- f->handle = talloc_p(f, struct pvfs_file_handle);
+ f->handle = talloc(f, struct pvfs_file_handle);
if (f->handle == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -468,12 +468,12 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
flags = O_RDONLY;
}
- f = talloc_p(req, struct pvfs_file);
+ f = talloc(req, struct pvfs_file);
if (f == NULL) {
return NT_STATUS_NO_MEMORY;
}
- f->handle = talloc_p(f, struct pvfs_file_handle);
+ f->handle = talloc(f, struct pvfs_file_handle);
if (f->handle == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -805,7 +805,7 @@ static NTSTATUS pvfs_open_setup_retry(struct ntvfs_module_context *ntvfs,
}
}
- r = talloc_p(req, struct pvfs_open_retry);
+ r = talloc(req, struct pvfs_open_retry);
if (r == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -962,12 +962,12 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
return status;
}
- f = talloc_p(req, struct pvfs_file);
+ f = talloc(req, struct pvfs_file);
if (f == NULL) {
return NT_STATUS_NO_MEMORY;
}
- f->handle = talloc_p(f, struct pvfs_file_handle);
+ f->handle = talloc(f, struct pvfs_file_handle);
if (f->handle == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_qfileinfo.c b/source4/ntvfs/posix/pvfs_qfileinfo.c
index 463574c8cf..4b6afac00a 100644
--- a/source4/ntvfs/posix/pvfs_qfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_qfileinfo.c
@@ -64,14 +64,14 @@ NTSTATUS pvfs_query_ea_list(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
int i;
- struct xattr_DosEAs *ealist = talloc_p(mem_ctx, struct xattr_DosEAs);
+ struct xattr_DosEAs *ealist = talloc(mem_ctx, struct xattr_DosEAs);
ZERO_STRUCTP(eas);
status = pvfs_doseas_load(pvfs, name, fd, ealist);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
- eas->eas = talloc_array_p(mem_ctx, struct ea_struct, num_names);
+ eas->eas = talloc_array(mem_ctx, struct ea_struct, num_names);
if (eas->eas == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -101,14 +101,14 @@ static NTSTATUS pvfs_query_all_eas(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
int i;
- struct xattr_DosEAs *ealist = talloc_p(mem_ctx, struct xattr_DosEAs);
+ struct xattr_DosEAs *ealist = talloc(mem_ctx, struct xattr_DosEAs);
ZERO_STRUCTP(eas);
status = pvfs_doseas_load(pvfs, name, fd, ealist);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
- eas->eas = talloc_array_p(mem_ctx, struct ea_struct, ealist->num_eas);
+ eas->eas = talloc_array(mem_ctx, struct ea_struct, ealist->num_eas);
if (eas->eas == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c
index fc1576b955..fc899c5fbc 100644
--- a/source4/ntvfs/posix/pvfs_resolve.c
+++ b/source4/ntvfs/posix/pvfs_resolve.c
@@ -75,7 +75,7 @@ static NTSTATUS pvfs_case_search(struct pvfs_state *pvfs, struct pvfs_filename *
}
}
- components = talloc_array_p(name, char *, num_components);
+ components = talloc_array(name, char *, num_components);
p = name->full_name + strlen(pvfs->base_directory);
*p++ = 0;
@@ -345,7 +345,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx, const char **fname, uint_t
if (c == '\\') num_components++;
}
- components = talloc_array_p(s, char *, num_components+1);
+ components = talloc_array(s, char *, num_components+1);
if (components == NULL) {
talloc_free(s);
return NT_STATUS_NO_MEMORY;
@@ -450,7 +450,7 @@ NTSTATUS pvfs_resolve_name(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
- *name = talloc_p(mem_ctx, struct pvfs_filename);
+ *name = talloc(mem_ctx, struct pvfs_filename);
if (*name == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -511,7 +511,7 @@ NTSTATUS pvfs_resolve_partial(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
- *name = talloc_p(mem_ctx, struct pvfs_filename);
+ *name = talloc(mem_ctx, struct pvfs_filename);
if (*name == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -591,7 +591,7 @@ NTSTATUS pvfs_resolve_parent(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
NTSTATUS status;
char *p;
- *name = talloc_p(mem_ctx, struct pvfs_filename);
+ *name = talloc(mem_ctx, struct pvfs_filename);
if (*name == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c
index 2106758784..76c1996ec7 100644
--- a/source4/ntvfs/posix/pvfs_search.c
+++ b/source4/ntvfs/posix/pvfs_search.c
@@ -244,7 +244,7 @@ static NTSTATUS pvfs_search_fill(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx,
name = pvfs_list_next(dir, &search->current_index);
if (name == NULL) break;
- file = talloc_p(mem_ctx, union smb_search_data);
+ file = talloc(mem_ctx, union smb_search_data);
if (!file) {
return NT_STATUS_NO_MEMORY;
}
@@ -334,7 +334,7 @@ static NTSTATUS pvfs_search_first_old(struct ntvfs_module_context *ntvfs,
/* we initially make search a child of the request, then if we
need to keep it long term we steal it for the private
structure */
- search = talloc_p(req, struct pvfs_search_state);
+ search = talloc(req, struct pvfs_search_state);
if (!search) {
return NT_STATUS_NO_MEMORY;
}
@@ -475,7 +475,7 @@ NTSTATUS pvfs_search_first(struct ntvfs_module_context *ntvfs,
/* we initially make search a child of the request, then if we
need to keep it long term we steal it for the private
structure */
- search = talloc_p(req, struct pvfs_search_state);
+ search = talloc(req, struct pvfs_search_state);
if (!search) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c
index 9934388461..9bc51d1ef4 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -174,7 +174,7 @@ NTSTATUS pvfs_setfileinfo_ea_set(struct pvfs_state *pvfs,
return NT_STATUS_NOT_SUPPORTED;
}
- ealist = talloc_p(name, struct xattr_DosEAs);
+ ealist = talloc(name, struct xattr_DosEAs);
/* load the current list */
status = pvfs_doseas_load(pvfs, name, fd, ealist);
@@ -194,7 +194,7 @@ NTSTATUS pvfs_setfileinfo_ea_set(struct pvfs_state *pvfs,
if (i==ealist->num_eas) {
/* add it */
- ealist->eas = talloc_realloc_p(ealist, ealist->eas,
+ ealist->eas = talloc_realloc(ealist, ealist->eas,
struct xattr_EA,
ealist->num_eas+1);
if (ealist->eas == NULL) {
diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c
index 98cd4a99f6..59a3d34640 100644
--- a/source4/ntvfs/posix/pvfs_shortname.c
+++ b/source4/ntvfs/posix/pvfs_shortname.c
@@ -497,7 +497,7 @@ static char *name_map(struct pvfs_mangle_context *ctx,
/* find the hash for this prefix */
v = hash = mangle_hash(ctx, name, prefix_len);
- new_name = talloc_array_p(ctx, char, 13);
+ new_name = talloc_array(ctx, char, 13);
if (new_name == NULL) {
return NULL;
}
@@ -608,7 +608,7 @@ NTSTATUS pvfs_mangle_init(struct pvfs_state *pvfs)
{
struct pvfs_mangle_context *ctx;
- ctx = talloc_p(pvfs, struct pvfs_mangle_context);
+ ctx = talloc(pvfs, struct pvfs_mangle_context);
if (ctx == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_streams.c b/source4/ntvfs/posix/pvfs_streams.c
index e92732b810..c9f2fcae29 100644
--- a/source4/ntvfs/posix/pvfs_streams.c
+++ b/source4/ntvfs/posix/pvfs_streams.c
@@ -38,7 +38,7 @@ NTSTATUS pvfs_stream_information(struct pvfs_state *pvfs,
int i;
NTSTATUS status;
- streams = talloc_p(mem_ctx, struct xattr_DosStreams);
+ streams = talloc(mem_ctx, struct xattr_DosStreams);
if (streams == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -49,7 +49,7 @@ NTSTATUS pvfs_stream_information(struct pvfs_state *pvfs,
}
info->num_streams = streams->num_streams+1;
- info->streams = talloc_array_p(mem_ctx, struct stream_struct, info->num_streams);
+ info->streams = talloc_array(mem_ctx, struct stream_struct, info->num_streams);
if (!info->streams) {
return NT_STATUS_NO_MEMORY;
}
@@ -85,7 +85,7 @@ NTSTATUS pvfs_stream_info(struct pvfs_state *pvfs, struct pvfs_filename *name, i
return NT_STATUS_OK;
}
- streams = talloc_p(name, struct xattr_DosStreams);
+ streams = talloc(name, struct xattr_DosStreams);
if (streams == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -127,7 +127,7 @@ static NTSTATUS pvfs_stream_update_size(struct pvfs_state *pvfs, struct pvfs_fil
int i;
NTSTATUS status;
- streams = talloc_p(name, struct xattr_DosStreams);
+ streams = talloc(name, struct xattr_DosStreams);
if (streams == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -148,7 +148,7 @@ static NTSTATUS pvfs_stream_update_size(struct pvfs_state *pvfs, struct pvfs_fil
if (i == streams->num_streams) {
struct xattr_DosStream *s;
- streams->streams = talloc_realloc_p(streams, streams->streams,
+ streams->streams = talloc_realloc(streams, streams->streams,
struct xattr_DosStream,
streams->num_streams+1);
if (streams->streams == NULL) {
@@ -204,7 +204,7 @@ NTSTATUS pvfs_stream_delete(struct pvfs_state *pvfs,
return status;
}
- streams = talloc_p(name, struct xattr_DosStreams);
+ streams = talloc(name, struct xattr_DosStreams);
if (streams == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c
index da36ac2239..c8d696f0fc 100644
--- a/source4/ntvfs/posix/pvfs_wait.c
+++ b/source4/ntvfs/posix/pvfs_wait.c
@@ -126,7 +126,7 @@ static int pvfs_wait_destructor(void *ptr)
struct timed_event te;
struct pvfs_wait *pwait;
- pwait = talloc_p(pvfs, struct pvfs_wait);
+ pwait = talloc(pvfs, struct pvfs_wait);
if (pwait == NULL) {
return NULL;
}
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c
index 0b642adb01..314f9736a3 100644
--- a/source4/ntvfs/posix/vfs_posix.c
+++ b/source4/ntvfs/posix/vfs_posix.c
@@ -104,7 +104,7 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
char *base_directory;
NTSTATUS status;
- pvfs = talloc_zero_p(tcon, struct pvfs_state);
+ pvfs = talloc_zero(tcon, struct pvfs_state);
if (pvfs == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/ntvfs/posix/xattr_tdb.c b/source4/ntvfs/posix/xattr_tdb.c
index eebae38ab7..0184244aa8 100644
--- a/source4/ntvfs/posix/xattr_tdb.c
+++ b/source4/ntvfs/posix/xattr_tdb.c
@@ -59,7 +59,7 @@ static NTSTATUS xattr_tdb_add_list(struct pvfs_state *pvfs, const char *attr_nam
len = strlen(attr_name) + 1;
- blob.data = talloc_realloc_p(mem_ctx, blob.data, uint8_t, blob.length + len);
+ blob.data = talloc_realloc(mem_ctx, blob.data, uint8_t, blob.length + len);
if (blob.data == NULL) {
talloc_free(mem_ctx);
return NT_STATUS_NO_MEMORY;
@@ -94,7 +94,7 @@ static NTSTATUS get_ea_db_key(TALLOC_CTX *mem_ctx,
}
}
- key->dptr = talloc_array_p(mem_ctx, char, 16 + len);
+ key->dptr = talloc_array(mem_ctx, char, 16 + len);
if (key->dptr == NULL) {
return NT_STATUS_NO_MEMORY;
}