diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2003-03-25 14:46:11 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2003-03-25 14:46:11 +0000 |
commit | 4905ba282fc1692b74208b177e934cdebd447c66 (patch) | |
tree | b5babd7fd0a7f39c175915cc563cf0239d552b25 /source3 | |
parent | bdd96341f1116dd67a24447ed672f7235b518c46 (diff) | |
download | samba-4905ba282fc1692b74208b177e934cdebd447c66.tar.gz samba-4905ba282fc1692b74208b177e934cdebd447c66.tar.bz2 samba-4905ba282fc1692b74208b177e934cdebd447c66.zip |
- Support building all auth modules as .so's
- Change 2 variable names to avoid conflicts (patch by Stephan Kulow <coolo@kde.org>)
(This used to be commit 71b05cd14ae6df8340730e7bad1c783dc278c5d3)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/Makefile.in | 41 | ||||
-rw-r--r-- | source3/auth/auth_domain.c | 2 | ||||
-rw-r--r-- | source3/configure.in | 14 | ||||
-rw-r--r-- | source3/libads/ldap.c | 66 | ||||
-rw-r--r-- | source3/libads/ldap_utils.c | 10 | ||||
-rw-r--r-- | source3/rpc_parse/parse_misc.c | 70 | ||||
-rw-r--r-- | source3/smbd/process.c | 2 |
7 files changed, 120 insertions, 85 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in index daf495c25e..95a4cee98f 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -295,9 +295,16 @@ PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o UNIGRP_OBJ = libsmb/netlogon_unigrp.o -AUTH_OBJ = auth/auth.o auth/auth_sam.o auth/auth_server.o auth/auth_domain.o \ - auth/auth_rhosts.o auth/auth_unix.o auth/auth_util.o auth/auth_winbind.o \ - auth/auth_builtin.o auth/auth_compat.o auth/auth_ntlmssp.o \ +AUTH_BUILTIN_OBJ = auth/auth_builtin.o +AUTH_DOMAIN_OBJ = auth/auth_domain.o +AUTH_SAM_OBJ = auth/auth_sam.o +AUTH_RHOSTS_OBJ = auth/auth_rhosts.o +AUTH_SERVER_OBJ = auth/auth_server.o +AUTH_UNIX_OBJ = auth/auth_unix.o +AUTH_WINBIND_OBJ = auth/auth_winbind.o + +AUTH_OBJ = auth/auth.o @AUTH_STATIC@ auth/auth_util.o auth/auth_compat.o \ + auth/auth_ntlmssp.o \ $(PLAINTEXT_AUTH_OBJ) $(UNIGRP_OBJ) MANGLE_OBJ = smbd/mangle.o smbd/mangle_hash.o smbd/mangle_map.o smbd/mangle_hash2.o @@ -945,6 +952,34 @@ nsswitch/pam_winbind.@SHLIBEXT@: $(PAM_WINBIND_OBJ) bin/.dummy @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) \ @SONAMEFLAG@`basename $@` -lpam +bin/rhosts.@SHLIBEXT@: $(AUTH_RHOSTS_OBJ) + @echo "Building plugin $@" + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_RHOSTS_OBJ) @SONAMEFLAG@`basename $@` + +bin/builtin.@SHLIBEXT@: $(AUTH_BUILTIN_OBJ) + @echo "Building plugin $@" + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_BUILTIN_OBJ) @SONAMEFLAG@`basename $@` + +bin/domain.@SHLIBEXT@: $(AUTH_DOMAIN_OBJ) + @echo "Building plugin $@" + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_DOMAIN_OBJ) @SONAMEFLAG@`basename $@` + +bin/server.@SHLIBEXT@: $(AUTH_SERVER_OBJ) + @echo "Building plugin $@" + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_SERVER_OBJ) @SONAMEFLAG@`basename $@` + +bin/winbind.@SHLIBEXT@: $(AUTH_WINBIND_OBJ) + @echo "Building plugin $@" + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_WINBIND_OBJ) @SONAMEFLAG@`basename $@` + +bin/unix.@SHLIBEXT@: $(AUTH_UNIX_OBJ) + @echo "Building plugin $@" + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_UNIX_OBJ) @SONAMEFLAG@`basename $@` + +bin/sam.@SHLIBEXT@: $(AUTH_SAM_OBJ) + @echo "Building plugin $@" + @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_SAM_OBJ) @SONAMEFLAG@`basename $@` + bin/mysql.@SHLIBEXT@: $(MYSQL_OBJ) @echo "Building plugin $@" @$(SHLD) $(LDSHFLAGS) -o $@ $(MYSQL_OBJ) @MYSQL_LIBS@ \ diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index 9ca2f4e190..256c4532ed 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -24,7 +24,7 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_AUTH -BOOL global_machine_password_needs_changing = False; +extern BOOL global_machine_password_needs_changing; extern userdom_struct current_user_info; diff --git a/source3/configure.in b/source3/configure.in index a6d078c8ce..3b940f08d9 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -3389,13 +3389,13 @@ SMB_SUBSYSTEM(RPC) SMB_MODULE(charset_weird, modules/developer.o, bin/developer.so, CHARSET) SMB_SUBSYSTEM(CHARSET) -SMB_MODULE(auth_rhosts, auth/auth_rhosts.o, bin/rhosts.so, AUTH) -SMB_MODULE(auth_sam, auth/auth_sam.o, bin/sam.so, AUTH) -SMB_MODULE(auth_unix, auth/auth_unix.o, bin/unix.so, AUTH) -SMB_MODULE(auth_winbind, auth/auth_winbind.o, bin/winbind.so, AUTH) -SMB_MODULE(auth_server, auth/auth_server.o, bin/server.so, AUTH) -SMB_MODULE(auth_domain, auth/auth_domain.o, bin/domain.so, AUTH) -SMB_MODULE(auth_builtin, auth/auth_builtin.o, bin/builtin.so, AUTH) +SMB_MODULE(auth_rhosts, \$(AUTH_RHOSTS_OBJ), bin/rhosts.so, AUTH) +SMB_MODULE(auth_sam, \$(AUTH_SAM_OBJ), bin/sam.so, AUTH) +SMB_MODULE(auth_unix, \$(AUTH_UNIX_OBJ), bin/unix.so, AUTH) +SMB_MODULE(auth_winbind, \$(AUTH_WINBIND_OBJ), bin/winbind.so, AUTH) +SMB_MODULE(auth_server, \$(AUTH_SERVER_OBJ), bin/server.so, AUTH) +SMB_MODULE(auth_domain, \$(AUTH_DOMAIN_OBJ), bin/domain.so, AUTH) +SMB_MODULE(auth_builtin, \$(AUTH_BUILTIN_OBJ), bin/builtin.so, AUTH) SMB_SUBSYSTEM(AUTH) AC_DEFINE_UNQUOTED(STRING_STATIC_MODULES, "$string_static_modules", [String list of builtin modules]) diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 67827d27f3..baedfb28db 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -401,7 +401,7 @@ static char **ads_pull_strvals(TALLOC_CTX *ctx, const char **in_vals) * @param ads connection to ads server * @param bind_path Base dn for the search * @param scope Scope of search (LDAP_BASE | LDAP_ONE | LDAP_SUBTREE) - * @param exp Search expression - specified in local charset + * @param expr Search expression - specified in local charset * @param attrs Attributes to retrieve - specified in utf8 or ascii * @param res ** which will contain results - free res* with ads_msgfree() * @param count Number of entries retrieved on this page @@ -409,12 +409,12 @@ static char **ads_pull_strvals(TALLOC_CTX *ctx, const char **in_vals) * @return status of search **/ ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path, - int scope, const char *exp, + int scope, const char *expr, const char **attrs, void **res, int *count, void **cookie) { int rc, i, version; - char *utf8_exp, *utf8_path, **search_attrs; + char *utf8_expr, *utf8_path, **search_attrs; LDAPControl PagedResults, NoReferrals, *controls[3], **rcontrols; BerElement *cookie_be = NULL; struct berval *cookie_bv= NULL; @@ -428,7 +428,7 @@ ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path, /* 0 means the conversion worked but the result was empty so we only fail if it's -1. In any case, it always at least nulls out the dest */ - if ((push_utf8_talloc(ctx, &utf8_exp, exp) == (size_t)-1) || + if ((push_utf8_talloc(ctx, &utf8_expr, expr) == (size_t)-1) || (push_utf8_talloc(ctx, &utf8_path, bind_path) == (size_t)-1)) { rc = LDAP_NO_MEMORY; goto done; @@ -489,7 +489,7 @@ ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path, */ ldap_set_option(ads->ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF); - rc = ldap_search_ext_s(ads->ld, utf8_path, scope, utf8_exp, + rc = ldap_search_ext_s(ads->ld, utf8_path, scope, utf8_expr, search_attrs, 0, controls, NULL, NULL, LDAP_NO_LIMIT, (LDAPMessage **)res); @@ -497,7 +497,7 @@ ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path, ber_bvfree(cookie_bv); if (rc) { - DEBUG(3,("ldap_search_ext_s(%s) -> %s\n", exp, ldap_err2string(rc))); + DEBUG(3,("ldap_search_ext_s(%s) -> %s\n", expr, ldap_err2string(rc))); goto done; } @@ -541,20 +541,20 @@ done: * @param ads connection to ads server * @param bind_path Base dn for the search * @param scope Scope of search (LDAP_BASE | LDAP_ONE | LDAP_SUBTREE) - * @param exp Search expression + * @param expr Search expression * @param attrs Attributes to retrieve * @param res ** which will contain results - free res* with ads_msgfree() * @return status of search **/ ADS_STATUS ads_do_search_all(ADS_STRUCT *ads, const char *bind_path, - int scope, const char *exp, + int scope, const char *expr, const char **attrs, void **res) { void *cookie = NULL; int count = 0; ADS_STATUS status; - status = ads_do_paged_search(ads, bind_path, scope, exp, attrs, res, + status = ads_do_paged_search(ads, bind_path, scope, expr, attrs, res, &count, &cookie); if (!ADS_ERR_OK(status)) return status; @@ -564,7 +564,7 @@ ADS_STATUS ads_do_search_all(ADS_STRUCT *ads, const char *bind_path, ADS_STATUS status2; LDAPMessage *msg, *next; - status2 = ads_do_paged_search(ads, bind_path, scope, exp, + status2 = ads_do_paged_search(ads, bind_path, scope, expr, attrs, &res2, &count, &cookie); if (!ADS_ERR_OK(status2)) break; @@ -588,14 +588,14 @@ ADS_STATUS ads_do_search_all(ADS_STRUCT *ads, const char *bind_path, * @param ads connection to ads server * @param bind_path Base dn for the search * @param scope Scope of search (LDAP_BASE | LDAP_ONE | LDAP_SUBTREE) - * @param exp Search expression - specified in local charset + * @param expr Search expression - specified in local charset * @param attrs Attributes to retrieve - specified in UTF-8 or ascii * @param fn Function which takes attr name, values list, and data_area * @param data_area Pointer which is passed to function on each call * @return status of search **/ ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path, - int scope, const char *exp, const char **attrs, + int scope, const char *expr, const char **attrs, BOOL(*fn)(char *, void **, void *), void *data_area) { @@ -604,7 +604,7 @@ ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path, ADS_STATUS status; void *res; - status = ads_do_paged_search(ads, bind_path, scope, exp, attrs, &res, + status = ads_do_paged_search(ads, bind_path, scope, expr, attrs, &res, &count, &cookie); if (!ADS_ERR_OK(status)) return status; @@ -613,7 +613,7 @@ ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path, ads_msgfree(ads, res); while (cookie) { - status = ads_do_paged_search(ads, bind_path, scope, exp, attrs, + status = ads_do_paged_search(ads, bind_path, scope, expr, attrs, &res, &count, &cookie); if (!ADS_ERR_OK(status)) break; @@ -630,18 +630,18 @@ ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path, * @param ads connection to ads server * @param bind_path Base dn for the search * @param scope Scope of search (LDAP_BASE | LDAP_ONE | LDAP_SUBTREE) - * @param exp Search expression + * @param expr Search expression * @param attrs Attributes to retrieve * @param res ** which will contain results - free res* with ads_msgfree() * @return status of search **/ ADS_STATUS ads_do_search(ADS_STRUCT *ads, const char *bind_path, int scope, - const char *exp, + const char *expr, const char **attrs, void **res) { struct timeval timeout; int rc; - char *utf8_exp, *utf8_path, **search_attrs = NULL; + char *utf8_expr, *utf8_path, **search_attrs = NULL; TALLOC_CTX *ctx; if (!(ctx = talloc_init("ads_do_search"))) { @@ -652,7 +652,7 @@ ADS_STATUS ads_do_search(ADS_STRUCT *ads, const char *bind_path, int scope, /* 0 means the conversion worked but the result was empty so we only fail if it's negative. In any case, it always at least nulls out the dest */ - if ((push_utf8_talloc(ctx, &utf8_exp, exp) == (size_t)-1) || + if ((push_utf8_talloc(ctx, &utf8_expr, expr) == (size_t)-1) || (push_utf8_talloc(ctx, &utf8_path, bind_path) == (size_t)-1)) { DEBUG(1,("ads_do_search: push_utf8_talloc() failed!")); rc = LDAP_NO_MEMORY; @@ -679,7 +679,7 @@ ADS_STATUS ads_do_search(ADS_STRUCT *ads, const char *bind_path, int scope, /* see the note in ads_do_paged_search - we *must* disable referrals */ ldap_set_option(ads->ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF); - rc = ldap_search_ext_s(ads->ld, utf8_path, scope, utf8_exp, + rc = ldap_search_ext_s(ads->ld, utf8_path, scope, utf8_expr, search_attrs, 0, NULL, NULL, &timeout, LDAP_NO_LIMIT, (LDAPMessage **)res); @@ -698,16 +698,16 @@ ADS_STATUS ads_do_search(ADS_STRUCT *ads, const char *bind_path, int scope, * Do a general ADS search * @param ads connection to ads server * @param res ** which will contain results - free res* with ads_msgfree() - * @param exp Search expression + * @param expr Search expression * @param attrs Attributes to retrieve * @return status of search **/ ADS_STATUS ads_search(ADS_STRUCT *ads, void **res, - const char *exp, + const char *expr, const char **attrs) { return ads_do_search(ads, ads->config.bind_path, LDAP_SCOPE_SUBTREE, - exp, attrs, res); + expr, attrs, res); } /** @@ -772,18 +772,18 @@ char *ads_get_dn(ADS_STRUCT *ads, void *res) ADS_STATUS ads_find_machine_acct(ADS_STRUCT *ads, void **res, const char *host) { ADS_STATUS status; - char *exp; + char *expr; const char *attrs[] = {"*", "nTSecurityDescriptor", NULL}; /* the easiest way to find a machine account anywhere in the tree is to look for hostname$ */ - if (asprintf(&exp, "(samAccountName=%s$)", host) == -1) { + if (asprintf(&expr, "(samAccountName=%s$)", host) == -1) { DEBUG(1, ("asprintf failed!\n")); return ADS_ERROR_NT(NT_STATUS_NO_MEMORY); } - status = ads_search(ads, res, exp, attrs); - free(exp); + status = ads_search(ads, res, expr, attrs); + free(expr); return status; } @@ -1424,7 +1424,7 @@ ADS_STATUS ads_leave_realm(ADS_STRUCT *ads, const char *hostname) ADS_STATUS ads_set_machine_sd(ADS_STRUCT *ads, const char *hostname, char *dn) { const char *attrs[] = {"nTSecurityDescriptor", "objectSid", 0}; - char *exp = 0; + char *expr = 0; size_t sd_size = 0; struct berval bval = {0, NULL}; prs_struct ps_wire; @@ -1452,7 +1452,7 @@ ADS_STATUS ads_set_machine_sd(ADS_STRUCT *ads, const char *hostname, char *dn) return ADS_ERROR_NT(NT_STATUS_NO_MEMORY); } - if (asprintf(&exp, "(samAccountName=%s$)", escaped_hostname) == -1) { + if (asprintf(&expr, "(samAccountName=%s$)", escaped_hostname) == -1) { DEBUG(1, ("ads_set_machine_sd: asprintf failed!\n")); SAFE_FREE(escaped_hostname); return ADS_ERROR_NT(NT_STATUS_NO_MEMORY); @@ -1460,7 +1460,7 @@ ADS_STATUS ads_set_machine_sd(ADS_STRUCT *ads, const char *hostname, char *dn) SAFE_FREE(escaped_hostname); - ret = ads_search(ads, (void *) &res, exp, attrs); + ret = ads_search(ads, (void *) &res, expr, attrs); if (!ADS_ERR_OK(ret)) return ret; @@ -2036,7 +2036,7 @@ but you need to force the bind path to match the configurationNamingContext from */ ADS_STATUS ads_workgroup_name(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **workgroup) { - char *exp; + char *expr; ADS_STATUS rc; char **principles; char *prefix; @@ -2047,10 +2047,10 @@ ADS_STATUS ads_workgroup_name(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **workg (*workgroup) = NULL; - asprintf(&exp, "(&(objectclass=computer)(dnshostname=%s.%s))", + asprintf(&expr, "(&(objectclass=computer)(dnshostname=%s.%s))", ads->config.ldap_server_name, ads->config.realm); - rc = ads_search(ads, &res, exp, attrs); - free(exp); + rc = ads_search(ads, &res, expr, attrs); + free(expr); if (!ADS_ERR_OK(rc)) { return rc; diff --git a/source3/libads/ldap_utils.c b/source3/libads/ldap_utils.c index 907f7c8aff..6855600288 100644 --- a/source3/libads/ldap_utils.c +++ b/source3/libads/ldap_utils.c @@ -28,7 +28,7 @@ this is supposed to catch dropped connections and auto-reconnect */ ADS_STATUS ads_do_search_retry(ADS_STRUCT *ads, const char *bind_path, int scope, - const char *exp, + const char *expr, const char **attrs, void **res) { ADS_STATUS status; @@ -46,10 +46,10 @@ ADS_STATUS ads_do_search_retry(ADS_STRUCT *ads, const char *bind_path, int scope return ADS_ERROR_NT(NT_STATUS_NO_MEMORY); while (count--) { - status = ads_do_search_all(ads, bp, scope, exp, attrs, res); + status = ads_do_search_all(ads, bp, scope, expr, attrs, res); if (ADS_ERR_OK(status)) { DEBUG(5,("Search for %s gave %d replies\n", - exp, ads_count_replies(ads, *res))); + expr, ads_count_replies(ads, *res))); free(bp); return status; } @@ -79,11 +79,11 @@ ADS_STATUS ads_do_search_retry(ADS_STRUCT *ads, const char *bind_path, int scope ADS_STATUS ads_search_retry(ADS_STRUCT *ads, void **res, - const char *exp, + const char *expr, const char **attrs) { return ads_do_search_retry(ads, ads->config.bind_path, LDAP_SCOPE_SUBTREE, - exp, attrs, res); + expr, attrs, res); } ADS_STATUS ads_search_retry_dn(ADS_STRUCT *ads, void **res, diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index b7b0e9346b..a39e3391bb 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/rpc_parse/parse_misc.c @@ -1289,22 +1289,22 @@ void init_dom_rid4(DOM_RID4 *rid4, uint16 unknown, uint16 attr, uint32 rid) Inits a DOM_CLNT_SRV structure. ********************************************************************/ -static void init_clnt_srv(DOM_CLNT_SRV *log, const char *logon_srv, const char *comp_name) +static void init_clnt_srv(DOM_CLNT_SRV *dlog, const char *logon_srv, const char *comp_name) { DEBUG(5,("init_clnt_srv: %d\n", __LINE__)); if (logon_srv != NULL) { - log->undoc_buffer = 1; - init_unistr2(&log->uni_logon_srv, logon_srv, strlen(logon_srv)+1); + dlog->undoc_buffer = 1; + init_unistr2(&dlog->uni_logon_srv, logon_srv, strlen(logon_srv)+1); } else { - log->undoc_buffer = 0; + dlog->undoc_buffer = 0; } if (comp_name != NULL) { - log->undoc_buffer2 = 1; - init_unistr2(&log->uni_comp_name, comp_name, strlen(comp_name)+1); + dlog->undoc_buffer2 = 1; + init_unistr2(&dlog->uni_comp_name, comp_name, strlen(comp_name)+1); } else { - log->undoc_buffer2 = 0; + dlog->undoc_buffer2 = 0; } } @@ -1312,9 +1312,9 @@ static void init_clnt_srv(DOM_CLNT_SRV *log, const char *logon_srv, const char * Inits or writes a DOM_CLNT_SRV structure. ********************************************************************/ -static BOOL smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *log, prs_struct *ps, int depth) +static BOOL smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *dlog, prs_struct *ps, int depth) { - if (log == NULL) + if (dlog == NULL) return False; prs_debug(ps, depth, desc, "smb_io_clnt_srv"); @@ -1323,22 +1323,22 @@ static BOOL smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *log, prs_struct *ps, if(!prs_align(ps)) return False; - if(!prs_uint32("undoc_buffer ", ps, depth, &log->undoc_buffer)) + if(!prs_uint32("undoc_buffer ", ps, depth, &dlog->undoc_buffer)) return False; - if (log->undoc_buffer != 0) { - if(!smb_io_unistr2("unistr2", &log->uni_logon_srv, log->undoc_buffer, ps, depth)) + if (dlog->undoc_buffer != 0) { + if(!smb_io_unistr2("unistr2", &dlog->uni_logon_srv, dlog->undoc_buffer, ps, depth)) return False; } if(!prs_align(ps)) return False; - if(!prs_uint32("undoc_buffer2", ps, depth, &log->undoc_buffer2)) + if(!prs_uint32("undoc_buffer2", ps, depth, &dlog->undoc_buffer2)) return False; - if (log->undoc_buffer2 != 0) { - if(!smb_io_unistr2("unistr2", &log->uni_comp_name, log->undoc_buffer2, ps, depth)) + if (dlog->undoc_buffer2 != 0) { + if(!smb_io_unistr2("unistr2", &dlog->uni_comp_name, dlog->undoc_buffer2, ps, depth)) return False; } @@ -1349,28 +1349,28 @@ static BOOL smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *log, prs_struct *ps, Inits a DOM_LOG_INFO structure. ********************************************************************/ -void init_log_info(DOM_LOG_INFO *log, const char *logon_srv, const char *acct_name, +void init_log_info(DOM_LOG_INFO *dlog, const char *logon_srv, const char *acct_name, uint16 sec_chan, const char *comp_name) { DEBUG(5,("make_log_info %d\n", __LINE__)); - log->undoc_buffer = 1; + dlog->undoc_buffer = 1; - init_unistr2(&log->uni_logon_srv, logon_srv, strlen(logon_srv)+1); - init_unistr2(&log->uni_acct_name, acct_name, strlen(acct_name)+1); + init_unistr2(&dlog->uni_logon_srv, logon_srv, strlen(logon_srv)+1); + init_unistr2(&dlog->uni_acct_name, acct_name, strlen(acct_name)+1); - log->sec_chan = sec_chan; + dlog->sec_chan = sec_chan; - init_unistr2(&log->uni_comp_name, comp_name, strlen(comp_name)+1); + init_unistr2(&dlog->uni_comp_name, comp_name, strlen(comp_name)+1); } /******************************************************************* Reads or writes a DOM_LOG_INFO structure. ********************************************************************/ -BOOL smb_io_log_info(const char *desc, DOM_LOG_INFO *log, prs_struct *ps, int depth) +BOOL smb_io_log_info(const char *desc, DOM_LOG_INFO *dlog, prs_struct *ps, int depth) { - if (log == NULL) + if (dlog == NULL) return False; prs_debug(ps, depth, desc, "smb_io_log_info"); @@ -1379,18 +1379,18 @@ BOOL smb_io_log_info(const char *desc, DOM_LOG_INFO *log, prs_struct *ps, int de if(!prs_align(ps)) return False; - if(!prs_uint32("undoc_buffer", ps, depth, &log->undoc_buffer)) + if(!prs_uint32("undoc_buffer", ps, depth, &dlog->undoc_buffer)) return False; - if(!smb_io_unistr2("unistr2", &log->uni_logon_srv, True, ps, depth)) + if(!smb_io_unistr2("unistr2", &dlog->uni_logon_srv, True, ps, depth)) return False; - if(!smb_io_unistr2("unistr2", &log->uni_acct_name, True, ps, depth)) + if(!smb_io_unistr2("unistr2", &dlog->uni_acct_name, True, ps, depth)) return False; - if(!prs_uint16("sec_chan", ps, depth, &log->sec_chan)) + if(!prs_uint16("sec_chan", ps, depth, &dlog->sec_chan)) return False; - if(!smb_io_unistr2("unistr2", &log->uni_comp_name, True, ps, depth)) + if(!smb_io_unistr2("unistr2", &dlog->uni_comp_name, True, ps, depth)) return False; return True; @@ -1529,21 +1529,21 @@ BOOL smb_io_clnt_info(const char *desc, DOM_CLNT_INFO *clnt, prs_struct *ps, in Inits a DOM_LOGON_ID structure. ********************************************************************/ -void init_logon_id(DOM_LOGON_ID *log, uint32 log_id_low, uint32 log_id_high) +void init_logon_id(DOM_LOGON_ID *dlog, uint32 log_id_low, uint32 log_id_high) { DEBUG(5,("make_logon_id: %d\n", __LINE__)); - log->low = log_id_low; - log->high = log_id_high; + dlog->low = log_id_low; + dlog->high = log_id_high; } /******************************************************************* Reads or writes a DOM_LOGON_ID structure. ********************************************************************/ -BOOL smb_io_logon_id(const char *desc, DOM_LOGON_ID *log, prs_struct *ps, int depth) +BOOL smb_io_logon_id(const char *desc, DOM_LOGON_ID *dlog, prs_struct *ps, int depth) { - if (log == NULL) + if (dlog == NULL) return False; prs_debug(ps, depth, desc, "smb_io_logon_id"); @@ -1552,9 +1552,9 @@ BOOL smb_io_logon_id(const char *desc, DOM_LOGON_ID *log, prs_struct *ps, int de if(!prs_align(ps)) return False; - if(!prs_uint32("low ", ps, depth, &log->low )) + if(!prs_uint32("low ", ps, depth, &dlog->low )) return False; - if(!prs_uint32("high", ps, depth, &log->high)) + if(!prs_uint32("high", ps, depth, &dlog->high)) return False; return True; diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 16ef30c46c..de1bea493f 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -44,7 +44,7 @@ extern userdom_struct current_user_info; extern int smb_read_error; SIG_ATOMIC_T reload_after_sighup = 0; SIG_ATOMIC_T got_sig_term = 0; -extern BOOL global_machine_password_needs_changing; +BOOL global_machine_password_needs_changing = False; extern int max_send; /**************************************************************************** |