diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-04-23 15:12:35 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-04-23 15:12:35 +0200 |
commit | 53d491c9a4011a7d9ad69db52fb91d163f3f990a (patch) | |
tree | 9d0ed3130f35142da50c2e20e8addfe8909f459f /source4 | |
parent | af6298a84dffb400551861c6dc34591f1473830c (diff) | |
parent | 1722859abd169f2949b5822f97c810f2b8d162da (diff) | |
download | samba-53d491c9a4011a7d9ad69db52fb91d163f3f990a.tar.gz samba-53d491c9a4011a7d9ad69db52fb91d163f3f990a.tar.xz samba-53d491c9a4011a7d9ad69db52fb91d163f3f990a.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba into abartlet-devel
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/make/rules.mk | 2 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/anr.c | 4 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/partition.c | 2 | ||||
-rw-r--r-- | source4/headermap.txt | 2 | ||||
-rw-r--r-- | source4/libcli/raw/rawfile.c | 1 | ||||
-rw-r--r-- | source4/libcli/smb_composite/connect.c | 2 | ||||
-rw-r--r-- | source4/libcli/util/errormap.c | 37 | ||||
-rw-r--r-- | source4/librpc/idl-deps.pl | 2 | ||||
-rw-r--r-- | source4/rpc_server/lsa/dcesrv_lsa.c | 2 |
9 files changed, 48 insertions, 6 deletions
diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index e38496ff34a..96b2a1ff8ba 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -182,7 +182,7 @@ showflags:: @echo ' MDLD_FLAGS = $(MDLD_FLAGS)' @echo ' SHLIBEXT = $(SHLIBEXT)' -base_srcdirs = $(srcdir) ../librpc/ ../lib/ ../libcli ../libgpo +base_srcdirs = $(srcdir) ../librpc/ ../lib/ ../libcli ../libgpo ../nsswitch etags: etags $(ETAGS_OPTIONS) `find $(base_srcdirs) -name "*.[ch]"` diff --git a/source4/dsdb/samdb/ldb_modules/anr.c b/source4/dsdb/samdb/ldb_modules/anr.c index a04f5ebfa6f..deeccac072a 100644 --- a/source4/dsdb/samdb/ldb_modules/anr.c +++ b/source4/dsdb/samdb/ldb_modules/anr.c @@ -89,6 +89,7 @@ static struct ldb_parse_tree *make_match_tree(struct ldb_module *module, match_tree->u.substring.chunks = talloc_array(match_tree, struct ldb_val *, 2); if (match_tree->u.substring.chunks == NULL){ + talloc_free(match_tree); ldb_oom(ldb); return NULL; } @@ -99,6 +100,9 @@ static struct ldb_parse_tree *make_match_tree(struct ldb_module *module, match_tree->u.equality.attr = attr; match_tree->u.equality.value = *match; break; + default: + talloc_free(match_tree); + return NULL; } return match_tree; } diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c index 3231f7ab0fc..663ff074af2 100644 --- a/source4/dsdb/samdb/ldb_modules/partition.c +++ b/source4/dsdb/samdb/ldb_modules/partition.c @@ -151,7 +151,7 @@ static struct dsdb_control_current_partition *find_partition(struct partition_pr } return NULL; -}; +} /** * fire the caller's callback for every entry, but only send 'done' once. diff --git a/source4/headermap.txt b/source4/headermap.txt index 1c86f9e9347..fb6be569368 100644 --- a/source4/headermap.txt +++ b/source4/headermap.txt @@ -30,7 +30,7 @@ auth/credentials/credentials.h: credentials.h auth/credentials/credentials_krb5.h: credentials/krb5.h rpc_server/dcerpc_server.h: dcerpc_server.h rpc_server/common/common.h: dcerpc_server/common.h -libcli/auth/credentials.h: domain_credentials.h +../libcli/auth/credentials.h: domain_credentials.h ../lib/util/charset/charset.h: charset.h libcli/ldap/ldap.h: ldap-util.h ../lib/torture/torture.h: torture.h diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c index 63de051b332..6fac7b8605c 100644 --- a/source4/libcli/raw/rawfile.c +++ b/source4/libcli/raw/rawfile.c @@ -796,6 +796,7 @@ _PUBLIC_ struct smbcli_request *smb_raw_close_send(struct smbcli_tree *tree, uni break; case RAW_CLOSE_SMB2: + case RAW_CLOSE_GENERIC: return NULL; } diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c index 3db777ddc8b..a5d05b7af14 100644 --- a/source4/libcli/smb_composite/connect.c +++ b/source4/libcli/smb_composite/connect.c @@ -418,6 +418,8 @@ static void state_handler(struct composite_context *c) case CONNECT_TCON: c->status = connect_tcon(c, state->io); break; + case CONNECT_DONE: + break; } if (state->stage == CONNECT_DONE) { diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c index 930e45b214e..22bf6121c90 100644 --- a/source4/libcli/util/errormap.c +++ b/source4/libcli/util/errormap.c @@ -21,6 +21,7 @@ #include "includes.h" #include "librpc/ndr/libndr.h" +#include "nsswitch/libwbclient/wbclient.h" /* This map was extracted by the ERRMAPEXTRACT smbtorture command. The setup was a Samba HEAD (2002-01-03) PDC and an Win2k member @@ -1406,3 +1407,39 @@ NTSTATUS ndr_map_error2ntstatus(enum ndr_err_code ndr_err) /* we should map all error codes to different status codes */ return NT_STATUS_INVALID_PARAMETER; } + +static const struct { + wbcErr wbc_err; + NTSTATUS nt_status; +} wbcErr_ntstatus_map[] = { + { WBC_ERR_SUCCESS, NT_STATUS_OK }, + { WBC_ERR_NOT_IMPLEMENTED, NT_STATUS_NOT_IMPLEMENTED }, + { WBC_ERR_UNKNOWN_FAILURE, NT_STATUS_UNSUCCESSFUL }, + { WBC_ERR_NO_MEMORY, NT_STATUS_NO_MEMORY }, + { WBC_ERR_INVALID_SID, NT_STATUS_INVALID_SID }, + { WBC_ERR_INVALID_PARAM, NT_STATUS_INVALID_PARAMETER }, + { WBC_ERR_WINBIND_NOT_AVAILABLE, NT_STATUS_SERVER_DISABLED }, + { WBC_ERR_DOMAIN_NOT_FOUND, NT_STATUS_NO_SUCH_DOMAIN }, + { WBC_ERR_INVALID_RESPONSE, NT_STATUS_INVALID_NETWORK_RESPONSE }, + { WBC_ERR_NSS_ERROR, NT_STATUS_INTERNAL_ERROR }, + { WBC_ERR_AUTH_ERROR, NT_STATUS_LOGON_FAILURE }, + { WBC_ERR_UNKNOWN_USER, NT_STATUS_NO_SUCH_USER }, + { WBC_ERR_UNKNOWN_GROUP, NT_STATUS_NO_SUCH_GROUP }, + { WBC_ERR_PWD_CHANGE_FAILED, NT_STATUS_PASSWORD_RESTRICTION } +}; + +NTSTATUS map_nt_error_from_wbcErr(wbcErr wbc_err) +{ + int i; + + /* Look through list */ + for (i=0;i<ARRAY_SIZE(wbcErr_ntstatus_map);i++) { + if (wbcErr_ntstatus_map[i].wbc_err == wbc_err) { + return wbcErr_ntstatus_map[i].nt_status; + } + } + + /* Default return */ + return NT_STATUS_UNSUCCESSFUL; +} + diff --git a/source4/librpc/idl-deps.pl b/source4/librpc/idl-deps.pl index b3f0451eebb..4d97139fc58 100644 --- a/source4/librpc/idl-deps.pl +++ b/source4/librpc/idl-deps.pl @@ -1,7 +1,6 @@ #!/usr/bin/perl use strict; use File::Basename; -use Cwd 'abs_path'; sub add($$) { @@ -20,7 +19,6 @@ foreach(@ARGV) { my $gen_ndr = dirname($f); $gen_ndr =~ s/\/idl$/\/gen_ndr/; - $gen_ndr = abs_path($gen_ndr); print "# $f\n"; add("IDL_FILES", $f); diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c index 1f1f6afa6d3..cbadf654fbd 100644 --- a/source4/rpc_server/lsa/dcesrv_lsa.c +++ b/source4/rpc_server/lsa/dcesrv_lsa.c @@ -933,7 +933,7 @@ static NTSTATUS dcesrv_lsa_CreateTrustedDomain_base(struct dcesrv_call_state *dc if (r->in.info->trust_direction & LSA_TRUST_DIRECTION_INBOUND) { msg_user = ldb_msg_new(mem_ctx); - if (msg == NULL) { + if (msg_user == NULL) { ldb_transaction_cancel(trusted_domain_state->policy->sam_ldb); return NT_STATUS_NO_MEMORY; } |