svn commit: samba r14448 - branches/SAMBA_3_0/source/rpc_client
branches/SAMBA_3_0/source/rpc_server trunk/source/rpc_client
trunk/source/rpc_server
jerry at samba.org
jerry at samba.org
Wed Mar 15 14:58:40 GMT 2006
Author: jerry
Date: 2006-03-15 14:58:39 +0000 (Wed, 15 Mar 2006)
New Revision: 14448
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14448
Log:
* protect against NULL cli_state* pointers in cli_rpc_pipe_open()
* Fix inverted logic check for machine accounts in get_md4pw()
Modified:
branches/SAMBA_3_0/source/rpc_client/cli_pipe.c
branches/SAMBA_3_0/source/rpc_server/srv_netlog_nt.c
trunk/source/rpc_client/cli_pipe.c
trunk/source/rpc_server/srv_netlog_nt.c
Changeset:
Modified: branches/SAMBA_3_0/source/rpc_client/cli_pipe.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_client/cli_pipe.c 2006-03-15 14:12:49 UTC (rev 14447)
+++ branches/SAMBA_3_0/source/rpc_client/cli_pipe.c 2006-03-15 14:58:39 UTC (rev 14448)
@@ -2171,6 +2171,12 @@
*perr = NT_STATUS_NO_MEMORY;
+ /* sanity check to protect against crashes */
+
+ if ( !cli ) {
+ return NT_STATUS_INVALID_HANDLE;
+ }
+
/* The pipe name index must fall within our array */
SMB_ASSERT((pipe_idx >= 0) && (pipe_idx < PI_MAX_PIPES));
Modified: branches/SAMBA_3_0/source/rpc_server/srv_netlog_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_netlog_nt.c 2006-03-15 14:12:49 UTC (rev 14447)
+++ branches/SAMBA_3_0/source/rpc_server/srv_netlog_nt.c 2006-03-15 14:58:39 UTC (rev 14448)
@@ -251,9 +251,10 @@
return NT_STATUS_ACCOUNT_DISABLED;
}
- if (!(acct_ctrl & ACB_SVRTRUST) ||
- !(acct_ctrl & ACB_WSTRUST) ||
- !(acct_ctrl & ACB_DOMTRUST)) {
+ if (!(acct_ctrl & ACB_SVRTRUST) &&
+ !(acct_ctrl & ACB_WSTRUST) &&
+ !(acct_ctrl & ACB_DOMTRUST))
+ {
DEBUG(0,("get_md4pw: Workstation %s: account is not a trust account\n", mach_acct));
TALLOC_FREE(sampass);
return NT_STATUS_NO_TRUST_SAM_ACCOUNT;
Modified: trunk/source/rpc_client/cli_pipe.c
===================================================================
--- trunk/source/rpc_client/cli_pipe.c 2006-03-15 14:12:49 UTC (rev 14447)
+++ trunk/source/rpc_client/cli_pipe.c 2006-03-15 14:58:39 UTC (rev 14448)
@@ -2171,6 +2171,12 @@
*perr = NT_STATUS_NO_MEMORY;
+ /* sanity check to protect against crashes */
+
+ if ( !cli ) {
+ return NT_STATUS_INVALID_HANDLE;
+ }
+
/* The pipe name index must fall within our array */
SMB_ASSERT((pipe_idx >= 0) && (pipe_idx < PI_MAX_PIPES));
Modified: trunk/source/rpc_server/srv_netlog_nt.c
===================================================================
--- trunk/source/rpc_server/srv_netlog_nt.c 2006-03-15 14:12:49 UTC (rev 14447)
+++ trunk/source/rpc_server/srv_netlog_nt.c 2006-03-15 14:58:39 UTC (rev 14448)
@@ -251,9 +251,10 @@
return NT_STATUS_ACCOUNT_DISABLED;
}
- if (!(acct_ctrl & ACB_SVRTRUST) ||
- !(acct_ctrl & ACB_WSTRUST) ||
- !(acct_ctrl & ACB_DOMTRUST)) {
+ if (!(acct_ctrl & ACB_SVRTRUST) &&
+ !(acct_ctrl & ACB_WSTRUST) &&
+ !(acct_ctrl & ACB_DOMTRUST))
+ {
DEBUG(0,("get_md4pw: Workstation %s: account is not a trust account\n", mach_acct));
TALLOC_FREE(sampass);
return NT_STATUS_NO_TRUST_SAM_ACCOUNT;
More information about the samba-cvs
mailing list