613 Commits

Author SHA1 Message Date
espie
1b06c79c82 make sure we're root when killing stuff. I'm mixing up right and left,
obviously.
2015-05-07 12:30:46 +00:00
espie
8be5de417c run kill as root, so trhat ssh masters are cleaned up properly 2015-05-06 12:20:35 +00:00
espie
fb70e18c6a don't write this as root 2015-05-06 10:58:19 +00:00
espie
a24437df0e open distinfo with the correct user, start clamping down on read rights
as well as write rights.
2015-05-06 09:17:28 +00:00
espie
63eb9e7deb fix gid handling: first switch back to being root, THEN set gid, THEN set
uid.
2015-05-06 09:16:32 +00:00
espie
3eefd2bae0 when local is too local, it can't work. Requires an extra indirection so that
dirs are made with the correct user.
2015-05-05 08:55:25 +00:00
espie
a4b8c76e29 go back to being groot if we dropped privileges. 2015-05-05 08:54:22 +00:00
espie
bb202eca87 a few more things to wrap as the correct user 2015-05-05 08:52:05 +00:00
espie
f5e1489f2c simplify 2015-05-05 08:51:13 +00:00
espie
1532f8dcb3 tweak affinity checks to include user in schizophrenic mode 2015-05-03 12:26:10 +00:00
espie
7e2d303386 store the user if necessary for round-robin mode 2015-05-03 12:22:42 +00:00
espie
9d105d68a0 that's cute 2015-05-03 12:15:05 +00:00
espie
8b8d117cf7 do a few more things with the correct user 2015-05-03 10:33:59 +00:00
espie
27015304c3 add a few more user convenience functions 2015-05-03 10:33:02 +00:00
espie
4567e005fe comment on that quirk 2015-05-03 10:32:28 +00:00
espie
c4d6e7991c typo in comment 2015-05-03 08:15:35 +00:00
espie
12cded975c forgot to drop user there. Probably a few more left :( 2015-05-02 17:43:27 +00:00
espie
758f0bf14e tweak round-robin mode to start at the first id 2015-05-02 17:14:50 +00:00
espie
a94b216a03 add more knobs to handle directory issues under "hostile" circumstances 2015-05-02 16:41:20 +00:00
espie
c58347ffc4 thinko 2015-05-02 16:07:44 +00:00
espie
2cf5860ba1 show the user for roundrobin 2015-05-02 15:59:35 +00:00
espie
bcd255ce0a fix gid switch 2015-05-02 15:59:06 +00:00
espie
48cc88307a future round-robin mode, one user per-build. 2015-05-02 13:12:39 +00:00
espie
909f468aca use the per-user Core thingy: make sure fetch cores are built with the
default prop, and set them to run as fetch_user, so that I can remove
the explicit run_as in the ftp command.
2015-05-02 12:55:43 +00:00
espie
f9b1a4dee9 allow setting user thru the Core (for future round-robin builds) 2015-05-02 11:04:38 +00:00
espie
e2f35e7d02 move the user handling code to a separate file.
remove "run_as" for open, we can do things directly.

More explicit code on open.
2015-05-02 09:44:40 +00:00
espie
70de7e8c72 fix creation of path log files 2015-05-01 20:49:46 +00:00
espie
d40042f30e lock_user is not needed, defaults to log_user for all practical cases 2015-05-01 19:42:54 +00:00
espie
2c469073c2 give size logs to log_user. 2015-05-01 18:27:43 +00:00
espie
795a501ff4 remove debug scaffolding. Found the bug (elsewhere, not surprisingly) 2015-05-01 15:41:52 +00:00
espie
f8d8faa9ef slight cleanup 2015-05-01 09:03:20 +00:00
espie
ad230f14e0 tweak the tweak 2015-04-30 21:43:28 +00:00
espie
5296a6691e a few more "tweak the user" for fetch handling 2015-04-29 13:28:36 +00:00
espie
388883bea1 display more junk info for now, trying to track down things 2015-04-29 10:59:03 +00:00
espie
017830ee1c blabla that doesn't matter 2015-04-29 08:18:42 +00:00
espie
1f51a7929e in a bizarre twist, since we store umask an an octal string, we need
to convert it back to use the built-in properly.
2015-04-27 17:01:37 +00:00
espie
c148e02ce4 more or less "the final" dpb pieces for fetching as a separate user. 2015-04-27 13:32:57 +00:00
espie
0163547b4f reexpand will work much better with the correct anchor 2015-04-27 08:14:20 +00:00
espie
e94eae598f use UserProxy and make_path method.
Have the default host handle chroot correctly.

(still a bit of fetch to fix)
2015-04-26 18:00:19 +00:00
espie
107eee3773 Add a way to make_path with uig/gid.
Add a way to run local jobs as another user.
2015-04-26 17:36:20 +00:00
espie
6968205389 do minimal discovery before reading config files, then do full discovery.
allow things like proper chroot in the config file only.
2015-04-25 14:24:03 +00:00
jasper
d42f9ea727 provide a dummy start_build() for DPB::SubEngine::NoBuild; this prevents a
crash when removing a lockfile in a fetch-only (nobuild) run.

ok espie@
2015-04-25 12:43:32 +00:00
espie
e06efd44da make most of the creatio files code able to change identity so that logging,
locking   don't happen as root.

Still need to do the fetchfiles/package linking part.
2015-04-25 11:40:58 +00:00
espie
f823ed0adf don't forget to copy all the users for later 2015-04-25 11:40:06 +00:00
espie
1184eb9bae more users, for later 2015-04-25 11:32:42 +00:00
espie
446fd12db9 don't bypass the logger method 2015-04-25 11:25:08 +00:00
espie
3286531cff zap duplicate redirection, was harmless 2015-04-25 11:24:24 +00:00
espie
4444edc95e a bit of cleanup: building the host properties is totally separate from
building the host (especially ensure overrides/finalize is run together).
Do default handling in a saner way, and use that to get a build_user
(and soon a log_user, a fetch_user).

Add run_as scaffolding to allow logging properly when dpb is run as root
(to be used soon)
2015-04-25 11:23:20 +00:00
espie
d14016b0b5 figure out whether we're running as root on localhost, and then do most
things internally (chroot, setuid, etc)
2015-04-25 10:07:19 +00:00
nicm
81baec9d23 Use objdump(1) rather than file(1) to detect binary and shared object
files.

ok espie
2015-04-22 14:03:43 +00:00