diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-27 07:08:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:09:15 -0500 |
commit | 759da3b915e2006d4c87b5ace47f399accd9ce91 (patch) | |
tree | 6bcaf9d4c0e38ef5e975c041d442c4437aa61e5a /source4/ntvfs | |
parent | 1e42cacf6a8643bd633f631c212d71760852abbc (diff) | |
download | samba-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')
25 files changed, 79 insertions, 79 deletions
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index cf6caebc76..7ac687dd46 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -201,7 +201,7 @@ static void async_simple(struct smbcli_request *c_req) if (!c_req) return NT_STATUS_UNSUCCESSFUL; \ { \ struct async_info *async; \ - async = talloc_p(req, struct async_info); \ + async = talloc(req, struct async_info); \ if (!async) return NT_STATUS_NO_MEMORY; \ async->parms = io; \ async->req = req; \ diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c index 7b351f77b0..f51e3d0694 100644 --- a/source4/ntvfs/common/brlock.c +++ b/source4/ntvfs/common/brlock.c @@ -78,7 +78,7 @@ struct brl_context *brl_init(TALLOC_CTX *mem_ctx, servid_t server, uint16_t tid, char *path; struct brl_context *brl; - brl = talloc_p(mem_ctx, struct brl_context); + brl = talloc(mem_ctx, struct brl_context); if (brl == NULL) { return NULL; } diff --git a/source4/ntvfs/common/opendb.c b/source4/ntvfs/common/opendb.c index 57beba8c68..0aa257073d 100644 --- a/source4/ntvfs/common/opendb.c +++ b/source4/ntvfs/common/opendb.c @@ -84,7 +84,7 @@ struct odb_context *odb_init(TALLOC_CTX *mem_ctx, servid_t server, char *path; struct odb_context *odb; - odb = talloc_p(mem_ctx, struct odb_context); + odb = talloc(mem_ctx, struct odb_context); if (odb == NULL) { return NULL; } @@ -124,7 +124,7 @@ struct odb_lock *odb_lock(TALLOC_CTX *mem_ctx, { struct odb_lock *lck; - lck = talloc_p(mem_ctx, struct odb_lock); + lck = talloc(mem_ctx, struct odb_lock); if (lck == NULL) { return NULL; } diff --git a/source4/ntvfs/common/sidmap.c b/source4/ntvfs/common/sidmap.c index 3254330c2f..46e02b5da1 100644 --- a/source4/ntvfs/common/sidmap.c +++ b/source4/ntvfs/common/sidmap.c @@ -45,7 +45,7 @@ struct sidmap_context { struct sidmap_context *sidmap_open(TALLOC_CTX *mem_ctx) { struct sidmap_context *sidmap; - sidmap = talloc_p(mem_ctx, struct sidmap_context); + sidmap = talloc(mem_ctx, struct sidmap_context); if (sidmap == NULL) { return NULL; } diff --git a/source4/ntvfs/ipc/ipc_rap.c b/source4/ntvfs/ipc/ipc_rap.c index aedb7acaef..a61dbcb852 100644 --- a/source4/ntvfs/ipc/ipc_rap.c +++ b/source4/ntvfs/ipc/ipc_rap.c @@ -77,7 +77,7 @@ static struct rap_call *new_rap_srv_call(TALLOC_CTX *mem_ctx, { struct rap_call *call; - call = talloc_p(mem_ctx, struct rap_call); + call = talloc(mem_ctx, struct rap_call); if (call == NULL) return NULL; @@ -92,7 +92,7 @@ static struct rap_call *new_rap_srv_call(TALLOC_CTX *mem_ctx, call->ndr_pull_data = ndr_pull_init_blob(&trans->in.data, mem_ctx); call->ndr_pull_data->flags = RAPNDR_FLAGS; - call->heap = talloc_p(mem_ctx, struct rap_string_heap); + call->heap = talloc(mem_ctx, struct rap_string_heap); if (call->heap == NULL) return NULL; @@ -179,7 +179,7 @@ static NTSTATUS rap_push_string(struct ndr_push *data_push, NDR_CHECK(ndr_push_uint16(data_push, heap->offset)); NDR_CHECK(ndr_push_uint16(data_push, 0)); - heap->strings = talloc_realloc_p(heap->mem_ctx, + heap->strings = talloc_realloc(heap->mem_ctx, heap->strings, const char *, heap->num_strings + 1); diff --git a/source4/ntvfs/ipc/rap_server.c b/source4/ntvfs/ipc/rap_server.c index 4875592ad6..c69ba2d168 100644 --- a/source4/ntvfs/ipc/rap_server.c +++ b/source4/ntvfs/ipc/rap_server.c @@ -32,7 +32,7 @@ NTSTATUS rap_netshareenum(struct smbsrv_request *req, int i; r->out.status = 0; r->out.available = dcesrv_common_get_count_of_shares(req, NULL); - r->out.info = talloc_array_p(req, + r->out.info = talloc_array(req, union rap_shareenum_info, r->out.available); for (i=0;i<r->out.available;i++) { diff --git a/source4/ntvfs/nbench/vfs_nbench.c b/source4/ntvfs/nbench/vfs_nbench.c index 560f4a646b..a1f03da367 100644 --- a/source4/ntvfs/nbench/vfs_nbench.c +++ b/source4/ntvfs/nbench/vfs_nbench.c @@ -97,7 +97,7 @@ static NTSTATUS nbench_connect(struct ntvfs_module_context *ntvfs, NTSTATUS status; char *logname = NULL; - nprivates = talloc_p(req->tcon, struct nbench_private); + nprivates = talloc(req->tcon, struct nbench_private); if (!nprivates) { return NT_STATUS_NO_MEMORY; } diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c index 051e92b19c..9b6c75e5c6 100644 --- a/source4/ntvfs/ntvfs_generic.c +++ b/source4/ntvfs/ntvfs_generic.c @@ -79,7 +79,7 @@ static NTSTATUS ntvfs_map_async_setup(struct smbsrv_request *req, second_stage_t fn) { struct ntvfs_map_async *m; - m = talloc_p(req, struct ntvfs_map_async); + m = talloc(req, struct ntvfs_map_async); if (m == NULL) { return NT_STATUS_NO_MEMORY; } @@ -217,7 +217,7 @@ static NTSTATUS ntvfs_map_open_finish(struct smbsrv_request *req, req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC; if (write_time != 0) { - sf = talloc_p(req, union smb_setfileinfo); + sf = talloc(req, union smb_setfileinfo); sf->generic.level = RAW_SFILEINFO_STANDARD; sf->generic.file.fnum = io2->generic.out.fnum; sf->standard.in.create_time = 0; @@ -227,7 +227,7 @@ static NTSTATUS ntvfs_map_open_finish(struct smbsrv_request *req, } if (set_size != 0) { - sf = talloc_p(req, union smb_setfileinfo); + sf = talloc(req, union smb_setfileinfo); sf->generic.level = RAW_SFILEINFO_END_OF_FILE_INFORMATION; sf->generic.file.fnum = io2->generic.out.fnum; sf->end_of_file_info.in.size = set_size; @@ -351,7 +351,7 @@ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io, NTSTATUS status; union smb_open *io2; - io2 = talloc_zero_p(req, union smb_open); + io2 = talloc_zero(req, union smb_open); if (io2 == NULL) { return NT_STATUS_NO_MEMORY; } @@ -417,7 +417,7 @@ NTSTATUS ntvfs_map_open(struct smbsrv_request *req, union smb_open *io, io2->generic.in.file_attr = io->t2open.in.file_attrs; io2->generic.in.fname = io->t2open.in.fname; - io2->generic.in.ea_list = talloc_p(io2, struct smb_ea_list); + io2->generic.in.ea_list = talloc(io2, struct smb_ea_list); io2->generic.in.ea_list->num_eas = io->t2open.in.num_eas; io2->generic.in.ea_list->eas = io->t2open.in.eas; @@ -485,7 +485,7 @@ NTSTATUS ntvfs_map_fsinfo(struct smbsrv_request *req, union smb_fsinfo *fs, NTSTATUS status; union smb_fsinfo *fs2; - fs2 = talloc_p(req, union smb_fsinfo); + fs2 = talloc(req, union smb_fsinfo); if (fs2 == NULL) { return NT_STATUS_NO_MEMORY; } @@ -714,7 +714,7 @@ NTSTATUS ntvfs_map_fileinfo(struct smbsrv_request *req, union smb_fileinfo *info info->stream_info.out.num_streams = info2->generic.out.num_streams; if (info->stream_info.out.num_streams > 0) { info->stream_info.out.streams = - talloc_array_p(req, + talloc_array(req, struct stream_struct, info->stream_info.out.num_streams); if (!info->stream_info.out.streams) { @@ -753,7 +753,7 @@ NTSTATUS ntvfs_map_fileinfo(struct smbsrv_request *req, union smb_fileinfo *info case RAW_FILEINFO_ALL_EAS: info->all_eas.out.num_eas = info2->generic.out.num_eas; if (info->all_eas.out.num_eas > 0) { - info->all_eas.out.eas = talloc_array_p(req, + info->all_eas.out.eas = talloc_array(req, struct ea_struct, info->all_eas.out.num_eas); if (!info->all_eas.out.eas) { @@ -840,7 +840,7 @@ NTSTATUS ntvfs_map_qfileinfo(struct smbsrv_request *req, union smb_fileinfo *inf NTSTATUS status; union smb_fileinfo *info2; - info2 = talloc_p(req, union smb_fileinfo); + info2 = talloc(req, union smb_fileinfo); if (info2 == NULL) { return NT_STATUS_NO_MEMORY; } @@ -869,7 +869,7 @@ NTSTATUS ntvfs_map_qpathinfo(struct smbsrv_request *req, union smb_fileinfo *inf NTSTATUS status; union smb_fileinfo *info2; - info2 = talloc_p(req, union smb_fileinfo); + info2 = talloc(req, union smb_fileinfo); if (info2 == NULL) { return NT_STATUS_NO_MEMORY; } @@ -902,12 +902,12 @@ NTSTATUS ntvfs_map_lock(struct smbsrv_request *req, union smb_lock *lck, union smb_lock *lck2; struct smb_lock_entry *locks; - lck2 = talloc_p(req, union smb_lock); + lck2 = talloc(req, union smb_lock); if (lck2 == NULL) { return NT_STATUS_NO_MEMORY; } - locks = talloc_array_p(lck2, struct smb_lock_entry, 1); + locks = talloc_array(lck2, struct smb_lock_entry, 1); if (locks == NULL) { return NT_STATUS_NO_MEMORY; } @@ -966,7 +966,7 @@ static NTSTATUS ntvfs_map_write_finish(struct smbsrv_request *req, case RAW_WRITE_WRITEUNLOCK: wr->writeunlock.out.nwritten = wr2->generic.out.nwritten; - lck = talloc_p(wr2, union smb_lock); + lck = talloc(wr2, union smb_lock); if (lck == NULL) { return NT_STATUS_NO_MEMORY; } @@ -988,7 +988,7 @@ static NTSTATUS ntvfs_map_write_finish(struct smbsrv_request *req, case RAW_WRITE_WRITECLOSE: wr->writeclose.out.nwritten = wr2->generic.out.nwritten; - cl = talloc_p(wr2, union smb_close); + cl = talloc(wr2, union smb_close); if (cl == NULL) { return NT_STATUS_NO_MEMORY; } @@ -1025,7 +1025,7 @@ NTSTATUS ntvfs_map_write(struct smbsrv_request *req, union smb_write *wr, union smb_write *wr2; NTSTATUS status; - wr2 = talloc_p(req, union smb_write); + wr2 = talloc(req, union smb_write); if (wr2 == NULL) { return NT_STATUS_NO_MEMORY; } @@ -1125,7 +1125,7 @@ NTSTATUS ntvfs_map_read(struct smbsrv_request *req, union smb_read *rd, NTSTATUS status; uint_t state; - rd2 = talloc_p(req, union smb_read); + rd2 = talloc(req, union smb_read); if (rd2 == NULL) { return NT_STATUS_NO_MEMORY; } @@ -1168,7 +1168,7 @@ NTSTATUS ntvfs_map_read(struct smbsrv_request *req, union smb_read *rd, state = req->async_states->state; req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC; - lck = talloc_p(rd2, union smb_lock); + lck = talloc(rd2, union smb_lock); if (lck == NULL) { status = NT_STATUS_NO_MEMORY; goto done; @@ -1206,7 +1206,7 @@ NTSTATUS ntvfs_map_close(struct smbsrv_request *req, union smb_close *cl, { union smb_close *cl2; - cl2 = talloc_p(req, union smb_close); + cl2 = talloc(req, union smb_close); if (cl2 == NULL) { return NT_STATUS_NO_MEMORY; } diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index 41e1b04d49..e360321882 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -33,7 +33,7 @@ NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req, { struct ntvfs_async_state *async; - async = talloc_p(req, struct ntvfs_async_state); + async = talloc(req, struct ntvfs_async_state); if (!async) { return NT_STATUS_NO_MEMORY; } 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; } diff --git a/source4/ntvfs/simple/svfs_util.c b/source4/ntvfs/simple/svfs_util.c index cfe846a828..c44a527458 100644 --- a/source4/ntvfs/simple/svfs_util.c +++ b/source4/ntvfs/simple/svfs_util.c @@ -64,7 +64,7 @@ struct svfs_dir *svfs_list_unix(TALLOC_CTX *mem_ctx, struct smbsrv_request *req, uint_t allocated = 0; char *low_mask; - dir = talloc_p(mem_ctx, struct svfs_dir); + dir = talloc(mem_ctx, struct svfs_dir); if (!dir) { return NULL; } dir->count = 0; @@ -108,7 +108,7 @@ struct svfs_dir *svfs_list_unix(TALLOC_CTX *mem_ctx, struct smbsrv_request *req, if (dir->count >= allocated) { allocated = (allocated + 100) * 1.2; - dir->files = talloc_realloc_p(dir, dir->files, struct svfs_dirfile, allocated); + dir->files = talloc_realloc(dir, dir->files, struct svfs_dirfile, allocated); if (!dir->files) { closedir(odir); return NULL; diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c index 57d626465a..ace0ad896f 100644 --- a/source4/ntvfs/simple/vfs_simple.c +++ b/source4/ntvfs/simple/vfs_simple.c @@ -71,7 +71,7 @@ static NTSTATUS svfs_connect(struct ntvfs_module_context *ntvfs, struct smbsrv_tcon *tcon = req->tcon; struct svfs_private *private; - private = talloc_p(tcon, struct svfs_private); + private = talloc(tcon, struct svfs_private); private->next_search_handle = 0; private->connectpath = talloc_strdup(tcon, lp_pathname(tcon->service)); @@ -227,7 +227,7 @@ static NTSTATUS svfs_map_fileinfo(struct ntvfs_module_context *ntvfs, info->generic.out.num_streams = 0; /* setup a single data stream */ info->generic.out.num_streams = 1 + (dir?dir->count:0); - info->generic.out.streams = talloc_array_p(req, + info->generic.out.streams = talloc_array(req, struct stream_struct, info->generic.out.num_streams); if (!info->generic.out.streams) { @@ -380,7 +380,7 @@ do_open: return map_nt_error_from_unix(errno); } - f = talloc_p(req->tcon, struct svfs_file); + f = talloc(req->tcon, struct svfs_file); f->fd = fd; f->name = talloc_strdup(req->tcon, unix_path); @@ -787,7 +787,7 @@ static NTSTATUS svfs_search_first(struct ntvfs_module_context *ntvfs, return NT_STATUS_NOT_SUPPORTED; } - search = talloc_zero_p(private, struct search_state); + search = talloc_zero(private, struct search_state); if (!search) { return NT_STATUS_NO_MEMORY; } diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c index a1a5244453..9915660d9b 100644 --- a/source4/ntvfs/unixuid/vfs_unixuid.c +++ b/source4/ntvfs/unixuid/vfs_unixuid.c @@ -46,7 +46,7 @@ struct unix_sec_ctx { */ static struct unix_sec_ctx *save_unix_security(TALLOC_CTX *mem_ctx) { - struct unix_sec_ctx *sec = talloc_p(mem_ctx, struct unix_sec_ctx); + struct unix_sec_ctx *sec = talloc(mem_ctx, struct unix_sec_ctx); if (sec == NULL) { return NULL; } @@ -57,7 +57,7 @@ static struct unix_sec_ctx *save_unix_security(TALLOC_CTX *mem_ctx) talloc_free(sec); return NULL; } - sec->groups = talloc_array_p(sec, gid_t, sec->ngroups); + sec->groups = talloc_array(sec, gid_t, sec->ngroups); if (sec->groups == NULL) { talloc_free(sec); return NULL; @@ -101,7 +101,7 @@ static NTSTATUS nt_token_to_unix_security(struct ntvfs_module_context *ntvfs, struct unixuid_private *private = ntvfs->private_data; int i; NTSTATUS status; - *sec = talloc_p(req, struct unix_sec_ctx); + *sec = talloc(req, struct unix_sec_ctx); /* we can't do unix security without a user and group */ if (token->num_sids < 2) { @@ -121,7 +121,7 @@ static NTSTATUS nt_token_to_unix_security(struct ntvfs_module_context *ntvfs, } (*sec)->ngroups = token->num_sids - 2; - (*sec)->groups = talloc_array_p(*sec, gid_t, (*sec)->ngroups); + (*sec)->groups = talloc_array(*sec, gid_t, (*sec)->ngroups); if ((*sec)->groups == NULL) { return NT_STATUS_NO_MEMORY; } @@ -208,7 +208,7 @@ static NTSTATUS unixuid_connect(struct ntvfs_module_context *ntvfs, struct unixuid_private *private; NTSTATUS status; - private = talloc_p(req->tcon, struct unixuid_private); + private = talloc(req->tcon, struct unixuid_private); if (!private) { return NT_STATUS_NO_MEMORY; } |