|
Lines 93-98
static struct {
Link Here
|
| 93 |
bool disable_x11; |
93 |
bool disable_x11; |
| 94 |
char *pam_service; |
94 |
char *pam_service; |
| 95 |
bool join_container; |
95 |
bool join_container; |
|
|
96 |
char *slurm_conf; |
| 96 |
} opts; |
97 |
} opts; |
| 97 |
|
98 |
|
| 98 |
static void _init_opts(void) |
99 |
static void _init_opts(void) |
|
Lines 108-113
static void _init_opts(void)
Link Here
|
| 108 |
opts.disable_x11 = false; |
109 |
opts.disable_x11 = false; |
| 109 |
opts.pam_service = NULL; |
110 |
opts.pam_service = NULL; |
| 110 |
opts.join_container = true; |
111 |
opts.join_container = true; |
|
|
112 |
opts.slurm_conf = NULL; |
| 111 |
} |
113 |
} |
| 112 |
|
114 |
|
| 113 |
/* Adopts a process into the given step. Returns SLURM_SUCCESS if |
115 |
/* Adopts a process into the given step. Returns SLURM_SUCCESS if |
|
Lines 689-694
static void _parse_opts(pam_handle_t *pamh, int argc, const char **argv)
Link Here
|
| 689 |
opts.pam_service = xstrdup(v); |
691 |
opts.pam_service = xstrdup(v); |
| 690 |
} else if (!xstrncasecmp(*argv, "join_container=false", 19)) { |
692 |
} else if (!xstrncasecmp(*argv, "join_container=false", 19)) { |
| 691 |
opts.join_container = false; |
693 |
opts.join_container = false; |
|
|
694 |
} else if (!xstrncasecmp(*argv, "slurm_conf=", 11)) { |
| 695 |
v = (char *)(11 + *argv); |
| 696 |
opts.slurm_conf = xstrdup(v); |
| 692 |
} |
697 |
} |
| 693 |
} |
698 |
} |
| 694 |
|
699 |
|
|
Lines 839-845
PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags
Link Here
|
| 839 |
* Initialize after root has been permitted access, which is critical |
844 |
* Initialize after root has been permitted access, which is critical |
| 840 |
* in case the config file won't load on this node for some reason. |
845 |
* in case the config file won't load on this node for some reason. |
| 841 |
*/ |
846 |
*/ |
| 842 |
slurm_conf_init(NULL); |
847 |
slurm_conf_init(opts.slurm_conf); |
| 843 |
slurm_cgroup_conf_init(); |
848 |
slurm_cgroup_conf_init(); |
| 844 |
|
849 |
|
| 845 |
/* |
850 |
/* |
|
Lines 909-914
cleanup:
Link Here
|
| 909 |
xfree(buf); |
914 |
xfree(buf); |
| 910 |
xfree(opts.node_name); |
915 |
xfree(opts.node_name); |
| 911 |
xfree(opts.pam_service); |
916 |
xfree(opts.pam_service); |
|
|
917 |
xfree(opts.slurm_conf); |
| 912 |
return rc; |
918 |
return rc; |
| 913 |
} |
919 |
} |
| 914 |
|
920 |
|