Lines Matching refs:smbd

59 #include "smbd.h"
92 smbd_t smbd;
110 smbd.s_pname = basename(argv[0]);
111 openlog(smbd.s_pname, LOG_PID | LOG_NOWAIT, LOG_DAEMON);
116 if ((uid = getuid()) != smbd.s_uid) {
119 if (smbd.s_fg == 0) {
120 smbd.s_fg = 1;
165 if (smbd.s_fg) {
187 while (!smbd.s_shutting_down) {
211 smbd.s_shutting_down = B_TRUE;
221 if (smbd.s_fg) {
230 return ((smbd.s_fatal_error) ? SMF_EXIT_ERR_FATAL : SMF_EXIT_OK);
251 rc = smb_init_daemon_priv(PU_RESETGROUPS, smbd.s_uid, smbd.s_gid);
276 openlog(smbd.s_pname, LOG_PID | LOG_NOWAIT, LOG_DAEMON);
301 openlog(smbd.s_pname, LOG_PID | LOG_NOWAIT, LOG_DAEMON);
313 * __init_daemon_priv() since we want smbd to have all privileges so that it
376 * Most privileges, except the ones that are required for smbd, are turn off
401 /* list of privileges for smbd */
440 smbd.s_pid = getpid();
446 if (smbd.s_dbg_stop) {
447 smbd_report("pid %d stop for debugger attach", smbd.s_pid);
448 (void) kill(smbd.s_pid, SIGSTOP);
450 smbd_report("smbd starting, pid %d", smbd.s_pid);
500 smbd.s_secmode = smb_config_get_secmode();
501 if ((rc = smb_domain_init(smbd.s_secmode)) != 0) {
523 smbd.s_door_srv = smbd_door_start();
524 if (smbd.s_door_srv < 0) {
539 smbd.s_door_lmshr = smbd_share_start();
540 if (smbd.s_door_lmshr < 0)
552 smbd.s_initialized = B_TRUE;
559 * Shutdown smbd and smbsrv kernel services.
567 smbd.s_shutting_down = B_TRUE;
589 smbd.s_initialized = B_FALSE;
595 * Called when SMF sends us a SIGHUP. Update the smbd configuration
603 if (smbd.s_shutting_down)
606 smbd.s_refreshes++;
609 if (smbd.s_debug || new_debug)
611 smbd.s_debug = new_debug;
645 smbd.s_secmode = secmode;
662 return (smbd.s_initialized && !smbd.s_shutting_down);
684 * in target), we assume that another smbd is already running. If there
727 if (smbd.s_kbound) {
745 smbd.s_kbound = B_TRUE;
773 rc = smb_kmod_start(smbd.s_door_opipe, smbd.s_door_lmshr,
774 smbd.s_door_srv);
791 smbd.s_kbound = B_FALSE;
856 rc = pthread_create(&smbd.s_localtime_tid, &attr,
885 if ((last_gmtoff != gmtoff) && smbd.s_kbound) {
943 smbd.s_uid = pwd->pw_uid;
946 smbd.s_gid = grp->gr_gid;
948 smbd.s_debug = smb_config_get_debug();
949 smbd.s_fg = smb_config_get_fg_flag();
954 smbd.s_debug++;
957 smbd.s_fg = 1;
960 smbd.s_dbg_stop = 1;
983 (void) fprintf(fp, "Usage: %s [-f]\n", smbd.s_pname);
1002 (void) fprintf(stderr, "smbd: %s\n", buf);