#include "popt_common.h"
#include "smbd/smbd.h"
#include "smbd/globals.h"
-#include "registry.h"
#include "registry/reg_init_full.h"
#include "libcli/auth/schannel.h"
#include "secrets.h"
extern int dcelogin_atmost_once;
#endif /* WITH_DFS */
-static void smbd_set_server_fd(int fd)
-{
- struct smbd_server_connection *sconn = smbd_server_conn;
- char addr[INET6_ADDRSTRLEN];
- const char *name;
-
- sconn->sock = fd;
-
- /*
- * Initialize sconn->client_id: If we can't find the client's
- * name, default to its address.
- */
-
- client_addr(fd, sconn->client_id.addr, sizeof(sconn->client_id.addr));
-
- name = client_name(sconn->sock);
- if (strcmp(name, "UNKNOWN") != 0) {
- name = talloc_strdup(sconn, name);
- } else {
- name = NULL;
- }
- sconn->client_id.name =
- (name != NULL) ? name : sconn->client_id.addr;
-
- sub_set_socket_ids(sconn->client_id.addr, sconn->client_id.name,
- client_socket_addr(sconn->sock, addr,
- sizeof(addr)));
-}
-
struct event_context *smbd_event_context(void)
{
return server_event_context();
* Reloading of the printers will not work here as we don't have a
* server info and rpc services set up. It will be called later.
*/
- if (!reload_services(smbd_messaging_context(), -1, False)) {
+ if (!reload_services(NULL, -1, False)) {
exit(1);
}
rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
"rpc_server", "epmapper",
"none");
- if (StrCaseCmp(rpcsrv_type, "daemon") == 0) {
+ if (strcasecmp_m(rpcsrv_type, "daemon") == 0) {
start_epmd(smbd_event_context(),
smbd_server_conn->msg_ctx);
}
rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
"rpc_server", "spoolss",
"embedded");
- if (StrCaseCmp(rpcsrv_type, "daemon") == 0) {
+ if (strcasecmp_m(rpcsrv_type, "daemon") == 0) {
start_spoolssd(smbd_event_context(),
smbd_messaging_context());
}