Skip to content

Commit

Permalink
Merge pull request flux-framework#2871 from garlick/no_userdb
Browse files Browse the repository at this point in the history
use config file for access policy
  • Loading branch information
mergify[bot] authored Mar 26, 2020
2 parents bb5309f + 14b0a70 commit 602fce7
Show file tree
Hide file tree
Showing 33 changed files with 107 additions and 1,084 deletions.
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@ AC_CONFIG_FILES( \
src/modules/cron/Makefile \
src/modules/aggregator/Makefile \
src/modules/pymod/Makefile \
src/modules/userdb/Makefile \
src/modules/job-ingest/Makefile \
src/modules/job-manager/Makefile \
src/modules/job-info/Makefile \
Expand Down
1 change: 0 additions & 1 deletion doc/man1/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ MAN1_FILES_PRIMARY = \
flux-hwloc.1 \
flux-proxy.1 \
flux-cron.1 \
flux-user.1 \
flux-event.1 \
flux-mini.1 \
flux-version.1 \
Expand Down
76 changes: 0 additions & 76 deletions doc/man1/flux-user.adoc

This file was deleted.

1 change: 0 additions & 1 deletion doc/test/spell.en.pws
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ UTC
addrole
delrole
strtoul
userdb
scratchdir
EHOSTUNREACH
ap
Expand Down
1 change: 0 additions & 1 deletion etc/flux.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Description=Flux message broker

[Service]
Environment=FLUX_USERDB_OPTIONS=--default-rolemask=user
TimeoutStopSec=90
KillMode=mixed
ExecStart=@X_BINDIR@/flux broker \
Expand Down
1 change: 0 additions & 1 deletion etc/rc1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ declare -a pids
flux hwloc reload & pids+=($!)
flux exec -r all flux module load job-info & pids+=($!)
flux module load cron sync=hb & pids+=($!)
flux module load userdb ${FLUX_USERDB_OPTIONS} & pids+=($!)
flux module load job-manager & pids+=($!)
wait_check ${pids[@]}
unset pids
Expand Down
2 changes: 0 additions & 2 deletions etc/rc3
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ flux module remove -f job-exec
flux module remove -f job-manager
flux exec -r all flux module remove -f job-ingest

flux module remove -f userdb

flux module remove -f cron
flux exec -r all flux module remove -f aggregator
flux exec -r all flux module remove -f barrier
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/python/flux/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def get_jobs(self):
# - Desired return value is json array, not a single value
#
# pylint: disable=dangerous-default-value
def job_list(flux_handle, max_entries=1000, attrs=[], userid=os.geteuid(), states=0):
def job_list(flux_handle, max_entries=1000, attrs=[], userid=os.getuid(), states=0):
payload = {
"max_entries": max_entries,
"attrs": attrs,
Expand Down
2 changes: 1 addition & 1 deletion src/broker/broker.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ int main (int argc, char *argv[])

ctx.tbon_k = 2; /* binary TBON is default */
/* Record the instance owner: the effective uid of the broker. */
ctx.cred.userid = geteuid ();
ctx.cred.userid = getuid ();
/* Set default rolemask for messages sent with flux_send()
* on the broker's internal handle. */
ctx.cred.rolemask = FLUX_ROLE_OWNER;
Expand Down
2 changes: 1 addition & 1 deletion src/broker/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ module_t *module_add (modhash_t *mh, const char *path)
* Since this is a point to point connection between broker threads,
* credentials are always those of the instance owner.
*/
p->cred.userid = geteuid ();
p->cred.userid = getuid ();
p->cred.rolemask = FLUX_ROLE_OWNER;

/* Update the modhash.
Expand Down
3 changes: 1 addition & 2 deletions src/cmd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ flux_SOURCES = \
builtin/heaptrace.c \
builtin/proxy.c \
builtin/relay.c \
builtin/python.c \
builtin/user.c
builtin/python.c
nodist_flux_SOURCES = \
builtin-cmds.c

Expand Down
2 changes: 1 addition & 1 deletion src/cmd/builtin/proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static int cmd_proxy (optparse_t *p, int ac, char *av[])
if (!(ctx.h = flux_open (uri, 0)))
log_err_exit ("%s", uri);
flux_log_set_appname (ctx.h, "proxy");
ctx.proxy_user = geteuid ();
ctx.proxy_user = getuid ();
if (!(r = flux_reactor_create (SIGCHLD)))
log_err_exit ("flux_reactor_create");
if (flux_set_reactor (ctx.h, r) < 0)
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/builtin/relay.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ static void relay (int infd, int outfd, flux_t *h)
usock_conn_set_error_cb (uconn, uconn_error, r);
usock_conn_set_recv_cb (uconn, uconn_recv, entry);

/* Use effective uid of the relay process as the userid for the
/* Use uid of the relay process as the userid for the
* single "client" on stdin.
*/
cred.userid = geteuid ();
cred.userid = getuid ();
cred.rolemask = FLUX_ROLE_NONE; // delegate to "upstream"
usock_conn_accept (uconn, &cred);

Expand Down
Loading

0 comments on commit 602fce7

Please sign in to comment.