[SCM] Samba Shared Repository - branch v3-2-stable updated -
release-3-2-0rc2-21-ge14c435
Karolin Seeger
kseeger at samba.org
Mon Jun 16 13:37:11 GMT 2008
The branch, v3-2-stable has been updated
via e14c43571fe184ceb065dec684d0aa4209df7668 (commit)
via 22958731c720c98823a3b39438948133dae32fa8 (commit)
via 3d2792ad269ce07d03f6891ac2f1a3a6d19fe8f2 (commit)
via 16f9c081757e64749184d0c719dcbe4b045064c4 (commit)
via 3f7ab6f52c2da40056e85441e01ed4d413f388ff (commit)
from 9b52e702d96a552f68e1af451ccdaf052b8c49a1 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable
- Log -----------------------------------------------------------------
commit e14c43571fe184ceb065dec684d0aa4209df7668
Author: Karolin Seeger <kseeger at samba.org>
Date: Fri Jun 13 21:31:34 2008 +0200
net: Fix several typos in comments.
-argc -> argv (where argv is meant)
-destoyed -> destroyed
-compleation -> completion
-aquired -> acquired
-Unify spelling of some words like rpc-server -> RPC server.
-Add missing punctuation marks.
Karolin
(cherry picked from commit 7c22fc6ebaa1a83213cbb7c08bea108264f89486)
commit 22958731c720c98823a3b39438948133dae32fa8
Author: Volker Lendecke <vl at samba.org>
Date: Fri Jun 13 16:05:31 2008 +0200
Fix a handle leak for error returns in ldb_try_load_dso
Coverity ID 464
(cherry picked from commit 496d44d2f21661c85bf07e8eb7cae6298fefd900)
commit 3d2792ad269ce07d03f6891ac2f1a3a6d19fe8f2
Author: Volker Lendecke <vl at samba.org>
Date: Sun Jun 15 00:14:27 2008 +0200
Fix group parsing in libwbclient's copy_group_entry()
This (also) fixes a flaw pointed out by the IBM checker. When verifying that I
found out that the parsing was not working as I would have expected it to.
Jerry, please check!
(cherry picked from commit c2c7790155ab02e1e351caf2bed192ce72913663)
commit 16f9c081757e64749184d0c719dcbe4b045064c4
Author: Volker Lendecke <vl at samba.org>
Date: Sun Jun 15 00:22:47 2008 +0200
Fix an uninitialized variable found by the IBM checker
BAIL_ON_PTR_ERROR jumps to done: which will access extra_data before it's
initialized.
Stefan, please check!
Volker
(cherry picked from commit b59636f78d351ed6d52c4a9fdccdb7850388526c)
commit 3f7ab6f52c2da40056e85441e01ed4d413f388ff
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jun 16 13:27:16 2008 +0200
Fix bug 5500 -- thanks to mathion at thorrovydeti.com for reporting
(cherry picked from commit 996c3ce6f0dbe79b0679ae30afd873c24fe5b1eb)
-----------------------------------------------------------------------
Summary of changes:
source/lib/ldb/common/ldb_modules.c | 8 +-
source/nsswitch/libwbclient/wbc_pwd.c | 20 +-
source/rpc_server/srv_lsa_nt.c | 2 +
source/utils/net_rpc.c | 744 ++++++++++++++++----------------
4 files changed, 392 insertions(+), 382 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/ldb/common/ldb_modules.c b/source/lib/ldb/common/ldb_modules.c
index 68c4535..d898f3d 100644
--- a/source/lib/ldb/common/ldb_modules.c
+++ b/source/lib/ldb/common/ldb_modules.c
@@ -206,6 +206,7 @@ int ldb_try_load_dso(struct ldb_context *ldb, const char *name)
void *handle;
int (*init_fn) (void);
char *modulesdir;
+ int ret;
#ifdef HAVE_DLOPEN
if (getenv("LD_LDB_MODULE_PATH") != NULL) {
@@ -234,12 +235,17 @@ int ldb_try_load_dso(struct ldb_context *ldb, const char *name)
if (init_fn == NULL) {
ldb_debug(ldb, LDB_DEBUG_ERROR, "no symbol `init_module' found in %s: %s\n", path, dlerror());
+ dlclose(handle);
return -1;
}
talloc_free(path);
- return init_fn();
+ ret = init_fn();
+ if (ret == -1) {
+ dlclose(handle);
+ }
+ return ret;
#else
ldb_debug(ldb, LDB_DEBUG_TRACE, "no dlopen() - not trying to load %s module\n", name);
return -1;
diff --git a/source/nsswitch/libwbclient/wbc_pwd.c b/source/nsswitch/libwbclient/wbc_pwd.c
index baee3c3..b5f1673 100644
--- a/source/nsswitch/libwbclient/wbc_pwd.c
+++ b/source/nsswitch/libwbclient/wbc_pwd.c
@@ -97,11 +97,13 @@ static struct group *copy_group_entry(struct winbindd_gr *g,
grp->gr_mem[i] = talloc_strdup(grp, mem_p);
BAIL_ON_PTR_ERROR(grp->gr_mem[i], wbc_status);
- *mem_q = ',';
- mem_p++;
- mem_p = mem_q;
+ if (mem_q == NULL) {
+ i += 1;
+ break;
+ }
+ mem_p = mem_q + 1;
}
- grp->gr_mem[g->num_gr_mem] = NULL;
+ grp->gr_mem[i] = NULL;
wbc_status = WBC_ERR_SUCCESS;
@@ -392,16 +394,16 @@ wbcErr wbcGetGroups(const char *account,
uint32_t i;
gid_t *groups = NULL;
- if (!account) {
- wbc_status = WBC_ERR_INVALID_PARAM;
- BAIL_ON_WBC_ERROR(wbc_status);
- }
-
/* Initialize request */
ZERO_STRUCT(request);
ZERO_STRUCT(response);
+ if (!account) {
+ wbc_status = WBC_ERR_INVALID_PARAM;
+ BAIL_ON_WBC_ERROR(wbc_status);
+ }
+
/* Send request */
strncpy(request.data.username, account, sizeof(request.data.username)-1);
diff --git a/source/rpc_server/srv_lsa_nt.c b/source/rpc_server/srv_lsa_nt.c
index 20c910e..79b6d46 100644
--- a/source/rpc_server/srv_lsa_nt.c
+++ b/source/rpc_server/srv_lsa_nt.c
@@ -491,7 +491,9 @@ NTSTATUS _lsa_EnumTrustDom(pipes_struct *p,
if (!(info->access & LSA_POLICY_VIEW_LOCAL_INFORMATION))
return NT_STATUS_ACCESS_DENIED;
+ become_root();
nt_status = pdb_enum_trusteddoms(p->mem_ctx, &num_domains, &domains);
+ unbecome_root();
if (!NT_STATUS_IS_OK(nt_status)) {
return nt_status;
diff --git a/source/utils/net_rpc.c b/source/utils/net_rpc.c
index a271f55..9ff3baf 100644
--- a/source/utils/net_rpc.c
+++ b/source/utils/net_rpc.c
@@ -99,10 +99,10 @@ NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
* @param pipe_name the pipe to connect to (usually a PIPE_ constant)
* @param conn_flag a NET_FLAG_ combination. Passed to
* net_make_ipc_connection.
- * @param argc Standard main() style argc
- * @param argc Standard main() style argv. Initial components are already
- * stripped
- * @return A shell status integer (0 for success)
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
+ * @return A shell status integer (0 for success).
*/
int run_rpc_command(struct cli_state *cli_arg,
@@ -202,14 +202,14 @@ int run_rpc_command(struct cli_state *cli_arg,
* Force a change of the trust acccount password.
*
* All parameters are provided by the run_rpc_command function, except for
- * argc, argv which are passes through.
+ * argc, argv which are passed through.
*
- * @param domain_sid The domain sid aquired from the remote server
+ * @param domain_sid The domain sid acquired from the remote server
* @param cli A cli_state connected to the server.
- * @param mem_ctx Talloc context, destoyed on compleation of the function.
- * @param argc Standard main() style argc
- * @param argc Standard main() style argv. Initial components are already
- * stripped
+ * @param mem_ctx Talloc context, destroyed on completion of the function.
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
* @return Normal NTSTATUS return.
**/
@@ -229,11 +229,11 @@ static NTSTATUS rpc_changetrustpw_internals(const DOM_SID *domain_sid,
/**
* Force a change of the trust acccount password.
*
- * @param argc Standard main() style argc
- * @param argc Standard main() style argv. Initial components are already
- * stripped
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
- * @return A shell status integer (0 for success)
+ * @return A shell status integer (0 for success).
**/
int net_rpc_changetrustpw(int argc, const char **argv)
@@ -251,14 +251,14 @@ int net_rpc_changetrustpw(int argc, const char **argv)
* The password should be created with 'server manager' or equiv first.
*
* All parameters are provided by the run_rpc_command function, except for
- * argc, argv which are passes through.
+ * argc, argv which are passed through.
*
- * @param domain_sid The domain sid aquired from the remote server
+ * @param domain_sid The domain sid acquired from the remote server.
* @param cli A cli_state connected to the server.
- * @param mem_ctx Talloc context, destoyed on compleation of the function.
- * @param argc Standard main() style argc
- * @param argc Standard main() style argv. Initial components are already
- * stripped
+ * @param mem_ctx Talloc context, destroyed on completion of the function.
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
* @return Normal NTSTATUS return.
**/
@@ -327,9 +327,9 @@ static NTSTATUS rpc_oldjoin_internals(const DOM_SID *domain_sid,
/**
* Join a domain, the old way.
*
- * @param argc Standard main() style argc
- * @param argc Standard main() style argv. Initial components are already
- * stripped
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
* @return A shell status integer (0 for success)
**/
@@ -345,11 +345,11 @@ static int net_rpc_perform_oldjoin(int argc, const char **argv)
/**
* Join a domain, the old way. This function exists to allow
* the message to be displayed when oldjoin was explicitly
- * requested, but not when it was implied by "net rpc join"
+ * requested, but not when it was implied by "net rpc join".
*
- * @param argc Standard main() style argc
- * @param argc Standard main() style argv. Initial components are already
- * stripped
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
* @return A shell status integer (0 for success)
**/
@@ -366,10 +366,10 @@ static int net_rpc_oldjoin(int argc, const char **argv)
}
/**
- * Basic usage function for 'net rpc join'
- * @param argc Standard main() style argc
- * @param argc Standard main() style argv. Initial components are already
- * stripped
+ * Basic usage function for 'net rpc join'.
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
**/
static int rpc_join_usage(int argc, const char **argv)
@@ -388,12 +388,12 @@ static int rpc_join_usage(int argc, const char **argv)
/**
* 'net rpc join' entrypoint.
- * @param argc Standard main() style argc
- * @param argc Standard main() style argv. Initial components are already
- * stripped
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
* Main 'net_rpc_join()' (where the admin username/password is used) is
- * in net_rpc_join.c
+ * in net_rpc_join.c.
* Try to just change the password, but if that doesn't work, use/prompt
* for a username/password.
**/
@@ -424,12 +424,12 @@ int net_rpc_join(int argc, const char **argv)
* All parameters are provided by the run_rpc_command function, except for
* argc, argv which are passed through.
*
- * @param domain_sid The domain sid acquired from the remote server
+ * @param domain_sid The domain sid acquired from the remote server.
* @param cli A cli_state connected to the server.
- * @param mem_ctx Talloc context, destoyed on completion of the function.
- * @param argc Standard main() style argc
- * @param argv Standard main() style argv. Initial components are already
- * stripped
+ * @param mem_ctx Talloc context, destroyed on completion of the function.
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
* @return Normal NTSTATUS return.
**/
@@ -491,8 +491,8 @@ NTSTATUS rpc_info_internals(const DOM_SID *domain_sid,
/**
* 'net rpc info' entrypoint.
* @param argc Standard main() style argc
- * @param argc Standard main() style argv. Initial components are already
- * stripped
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
**/
int net_rpc_info(int argc, const char **argv)
@@ -506,14 +506,14 @@ int net_rpc_info(int argc, const char **argv)
* Fetch domain SID into the local secrets.tdb
*
* All parameters are provided by the run_rpc_command function, except for
- * argc, argv which are passes through.
+ * argc, argv which are passed through.
*
- * @param domain_sid The domain sid acquired from the remote server
+ * @param domain_sid The domain sid acquired from the remote server.
* @param cli A cli_state connected to the server.
- * @param mem_ctx Talloc context, destoyed on completion of the function.
- * @param argc Standard main() style argc
- * @param argv Standard main() style argv. Initial components are already
- * stripped
+ * @param mem_ctx Talloc context, destroyed on completion of the function.
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
* @return Normal NTSTATUS return.
**/
@@ -542,9 +542,9 @@ static NTSTATUS rpc_getsid_internals(const DOM_SID *domain_sid,
/**
* 'net rpc getsid' entrypoint.
- * @param argc Standard main() style argc
- * @param argc Standard main() style argv. Initial components are already
- * stripped
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
**/
int net_rpc_getsid(int argc, const char **argv)
@@ -557,9 +557,9 @@ int net_rpc_getsid(int argc, const char **argv)
/****************************************************************************/
/**
- * Basic usage function for 'net rpc user'
+ * Basic usage function for 'net rpc user'.
* @param argc Standard main() style argc.
- * @param argv Standard main() style argv. Initial components are already
+ * @param argv Standard main() style argv. Initial components are already
* stripped.
**/
@@ -569,11 +569,11 @@ static int rpc_user_usage(int argc, const char **argv)
}
/**
- * Add a new user to a remote RPC server
+ * Add a new user to a remote RPC server.
*
- * @param argc Standard main() style argc
+ * @param argc Standard main() style argc.
* @param argv Standard main() style argv. Initial components are already
- * stripped
+ * stripped.
*
* @return A shell status integer (0 for success)
**/
@@ -611,17 +611,17 @@ static int rpc_user_add(int argc, const char **argv)
}
/**
- * Rename a user on a remote RPC server
+ * Rename a user on a remote RPC server.
*
* All parameters are provided by the run_rpc_command function, except for
- * argc, argv which are passes through.
+ * argc, argv which are passed through.
*
- * @param domain_sid The domain sid acquired from the remote server
+ * @param domain_sid The domain sid acquired from the remote server.
* @param cli A cli_state connected to the server.
- * @param mem_ctx Talloc context, destoyed on completion of the function.
- * @param argc Standard main() style argc
- * @param argv Standard main() style argv. Initial components are already
- * stripped
+ * @param mem_ctx Talloc context, destroyed on completion of the function.
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
* @return Normal NTSTATUS return.
**/
@@ -729,13 +729,13 @@ static NTSTATUS rpc_user_rename_internals(const DOM_SID *domain_sid,
}
/**
- * Rename a user on a remote RPC server
+ * Rename a user on a remote RPC server.
*
- * @param argc Standard main() style argc
- * @param argv Standard main() style argv. Initial components are already
- * stripped
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
- * @return A shell status integer (0 for success)
+ * @return A shell status integer (0 for success).
**/
static int rpc_user_rename(int argc, const char **argv)
@@ -745,13 +745,13 @@ static int rpc_user_rename(int argc, const char **argv)
}
/**
- * Delete a user from a remote RPC server
+ * Delete a user from a remote RPC server.
*
- * @param argc Standard main() style argc
- * @param argv Standard main() style argv. Initial components are already
- * stripped
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
- * @return A shell status integer (0 for success)
+ * @return A shell status integer (0 for success).
**/
static int rpc_user_delete(int argc, const char **argv)
@@ -779,17 +779,17 @@ static int rpc_user_delete(int argc, const char **argv)
}
/**
- * Set a password for a user on a remote RPC server
+ * Set a password for a user on a remote RPC server.
*
* All parameters are provided by the run_rpc_command function, except for
- * argc, argv which are passes through.
+ * argc, argv which are passed through.
*
- * @param domain_sid The domain sid acquired from the remote server
+ * @param domain_sid The domain sid acquired from the remote server.
* @param cli A cli_state connected to the server.
- * @param mem_ctx Talloc context, destoyed on completion of the function.
- * @param argc Standard main() style argc
- * @param argv Standard main() style argv. Initial components are already
- * stripped
+ * @param mem_ctx Talloc context, destroyed on completion of the function.
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
* @return Normal NTSTATUS return.
**/
@@ -902,13 +902,13 @@ static NTSTATUS rpc_user_password_internals(const DOM_SID *domain_sid,
}
/**
- * Set a user's password on a remote RPC server
+ * Set a user's password on a remote RPC server.
*
- * @param argc Standard main() style argc
- * @param argv Standard main() style argv. Initial components are already
- * stripped
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
- * @return A shell status integer (0 for success)
+ * @return A shell status integer (0 for success).
**/
static int rpc_user_password(int argc, const char **argv)
@@ -918,17 +918,17 @@ static int rpc_user_password(int argc, const char **argv)
}
/**
- * List user's groups on a remote RPC server
+ * List user's groups on a remote RPC server.
*
* All parameters are provided by the run_rpc_command function, except for
- * argc, argv which are passes through.
+ * argc, argv which are passed through.
*
- * @param domain_sid The domain sid acquired from the remote server
+ * @param domain_sid The domain sid acquired from the remote server.
* @param cli A cli_state connected to the server.
- * @param mem_ctx Talloc context, destoyed on completion of the function.
- * @param argc Standard main() style argc
+ * @param mem_ctx Talloc context, destroyed on completion of the function.
+ * @param argc Standard main() style argc.
* @param argv Standard main() style argv. Initial components are already
- * stripped
+ * stripped.
*
* @return Normal NTSTATUS return.
**/
@@ -1032,13 +1032,13 @@ static NTSTATUS rpc_user_info_internals(const DOM_SID *domain_sid,
}
/**
- * List a user's groups from a remote RPC server
+ * List a user's groups from a remote RPC server.
*
- * @param argc Standard main() style argc
- * @param argv Standard main() style argv. Initial components are already
- * stripped
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
- * @return A shell status integer (0 for success)
+ * @return A shell status integer (0 for success).
**/
static int rpc_user_info(int argc, const char **argv)
@@ -1048,17 +1048,17 @@ static int rpc_user_info(int argc, const char **argv)
}
/**
- * List users on a remote RPC server
+ * List users on a remote RPC server.
*
* All parameters are provided by the run_rpc_command function, except for
- * argc, argv which are passes through.
+ * argc, argv which are passed through.
*
- * @param domain_sid The domain sid acquired from the remote server
+ * @param domain_sid The domain sid acquired from the remote server.
* @param cli A cli_state connected to the server.
- * @param mem_ctx Talloc context, destoyed on completion of the function.
- * @param argc Standard main() style argc
- * @param argv Standard main() style argv. Initial components are already
- * stripped
+ * @param mem_ctx Talloc context, destroyed on completion of the function.
+ * @param argc Standard main() style argc.
+ * @param argv Standard main() style argv. Initial components are already
+ * stripped.
*
* @return Normal NTSTATUS return.
**/
@@ -1140,9 +1140,9 @@ static NTSTATUS rpc_user_list_internals(const DOM_SID *domain_sid,
/**
* 'net rpc user' entrypoint.
- * @param argc Standard main() style argc
- * @param argc Standard main() style argv. Initial components are already
- * stripped
+ * @param argc Standard main() style argc.
--
Samba Shared Repository
More information about the samba-cvs
mailing list