[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Fri Mar 9 11:02:02 MST 2012
The branch, master has been updated
via 177c61b s3: asprintf->talloc_asprintf
via 8a75d3d s3: Replace a SMB_ASSERT with an error return
via 1bf126c s3: Remove some superfluous ()
from 9a93f43 s4 dns: Add support for PTR queries.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 177c61bd72af3f8bf4bad5221e1ff67084bde397
Author: Volker Lendecke <vl at samba.org>
Date: Fri Mar 9 14:47:43 2012 +0100
s3: asprintf->talloc_asprintf
Autobuild-User: Volker Lendecke <vl at samba.org>
Autobuild-Date: Fri Mar 9 19:01:06 CET 2012 on sn-devel-104
commit 8a75d3d91e90cc0cf617f06c63660d354684a60b
Author: Volker Lendecke <vl at samba.org>
Date: Fri Mar 9 14:45:21 2012 +0100
s3: Replace a SMB_ASSERT with an error return
commit 1bf126c0b3bc3b6d73571bba4105f46bd1ad68ce
Author: Volker Lendecke <vl at samba.org>
Date: Fri Mar 9 16:24:56 2012 +0100
s3: Remove some superfluous ()
-----------------------------------------------------------------------
Summary of changes:
source3/rpc_client/cli_lsarpc.c | 2 +-
source3/smbd/notify.c | 16 +++++++++++-----
2 files changed, 12 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index 66192bd..59ca3b0 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -299,7 +299,7 @@ static NTSTATUS dcerpc_lsa_lookup_sids_noalloc(struct dcerpc_binding_handle *h,
domains[i] = talloc_strdup(domains,
dom_name ? dom_name : "");
(types)[i] = lsa_names.names[i].sid_type;
- if (((domains)[i] == NULL)) {
+ if ((domains)[i] == NULL) {
DEBUG(0, ("cli_lsa_lookup_sids_noalloc(): out of memory\n"));
*presult = NT_STATUS_UNSUCCESSFUL;
return status;
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index 8160d5a..37d585b 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -181,7 +181,11 @@ NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
struct notify_entry e;
NTSTATUS status;
- SMB_ASSERT(fsp->notify == NULL);
+ if (fsp->notify != NULL) {
+ DEBUG(1, ("change_notify_create: fsp->notify != NULL, "
+ "fname = %s\n", fsp->fsp_name->base_name));
+ return NT_STATUS_INVALID_PARAMETER;
+ }
if (!(fsp->notify = talloc_zero(NULL, struct notify_change_buf))) {
DEBUG(0, ("talloc failed\n"));
@@ -189,9 +193,11 @@ NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
}
/* Do notify operations on the base_name. */
- if (asprintf(&fullpath, "%s/%s", fsp->conn->connectpath,
- fsp->fsp_name->base_name) == -1) {
- DEBUG(0, ("asprintf failed\n"));
+ fullpath = talloc_asprintf(
+ talloc_tos(), "%s/%s", fsp->conn->connectpath,
+ fsp->fsp_name->base_name);
+ if (fullpath == NULL) {
+ DEBUG(0, ("talloc_asprintf failed\n"));
TALLOC_FREE(fsp->notify);
return NT_STATUS_NO_MEMORY;
}
@@ -207,7 +213,7 @@ NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
}
status = notify_add(fsp->conn->notify_ctx, &e, notify_callback, fsp);
- SAFE_FREE(fullpath);
+ TALLOC_FREE(fullpath);
return status;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list