aboutsummaryrefslogtreecommitdiff
path: root/src/connection
Commit message (Collapse)AuthorAge
* convert some internal shell snippets to single linesSean Whitton2022-06-27
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* 'SETNS POST-FORK: use MAPL, hopefully in favour of readabilitySean Whitton2022-06-25
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* fix FSTAB:HAS-ENTRIES-FOR-OPENED-VOLUMES for FAT32 filesystemsSean Whitton2022-06-24
| | | | | | | | The property should never have been calling SUBVOLUMES-OF-TYPE because opening volumes does not ever update the VOLUME-CONTENTS slot to contain OPENED-VOLUME values. The structure of the OPENED-VOLUMES connattr is that of a flat list. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* wrap OSICAT:USER-INFO with getent(1) fallbackSean Whitton2022-06-17
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename connattr :OPENED-VOLUMES -> DISK:OPENED-VOLUMESSean Whitton2022-04-28
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename ASSERT-EUID-ROOT -> ASSERT-REMOTE-EUID-ROOTSean Whitton2022-04-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* convert PACKAGE:*CONSFIGURATOR-SYSTEM-DEPENDENCIES* to a constantSean Whitton2022-04-16
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* convert *LINUX-{BASIC,EFIVARS}-VFS* -> +LINUX-{BASIC,EFIVARS}-VFS+Sean Whitton2022-04-16
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* drop plus signs & use underscores in C preprocessor constantsSean Whitton2022-04-16
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* REHOME-CONNECTION: rename slot DATADIR -> REHOME-DATADIRSean Whitton2022-04-13
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* REHOME-CONNECTION: expand documentation for DATADIR slotSean Whitton2022-04-13
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* src/connection/rehome.lisp: drop a superfluous use of WITH-SLOTSSean Whitton2022-04-13
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename PASSPHRASE class and its associated functionsSean Whitton2022-04-10
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* tidy up slots of DATA classSean Whitton2022-04-10
| | | | | | | | | | - Rename IDEN1->DATA-IDEN1, IDEN2->DATA-IDEN2. - Require values for DATA-IDEN1, DATA-IDEN2 AND DATA-VERSION slots. - Leave DATA-MIME unbound rather than initialising to NIL. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename READFILE, WRITEFILE, corresponding generics and some wrappersSean Whitton2022-04-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename CONNECTION-TEARDOWN -> CONNECTION-TEAR-DOWNSean Whitton2022-04-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename RETURN-EXIT -> EXIT-CODE-TO-RETVALSean Whitton2022-04-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename SYSTEMD-{-USER -> USER-INSTANCE-ARGS} & stop using &restSean Whitton2022-04-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :SUDO: use :FROM not :AS for keyword argumentSean Whitton2022-04-02
| | | | | | Primarily to avoid confusion with :AS connection type. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* EVAL-IN-{GRANDCHILD,REINVOKED}: convert from macros to functionsSean Whitton2022-04-02
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* fix a comment's example usage of the :SSH connection typeSean Whitton2022-04-01
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* connection chain specs.: consistently use :USER for the target userSean Whitton2022-04-01
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename *STANDARD-LINUX-VFS* -> *LINUX-BASIC-VFS*Sean Whitton2022-04-01
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename PASSWD-ENTRY -> PASSWD-FIELDSean Whitton2022-04-01
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* MAPC-OPEN-{INPUT,OUTPUT}-STREAMS: don't use &restSean Whitton2022-03-12
| | | | | | This brings these functions closer to MAPC. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* replace ESCAPE-SH-TOKEN and ESCAPE-SH-COMMAND with new SH-ESCAPESean Whitton2022-03-11
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add "local" and "remote" to the names of some exported symbolsSean Whitton2022-03-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename MEMSTRING= -> MEMSTR=Sean Whitton2022-03-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* avoid trying to define +NAMESPACE-TYPES+ at all on non-LinuxSean Whitton2021-11-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* avoid unbound variable error on older kernels without CLONE_NEWTIMESean Whitton2021-11-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* use higher-numbered codes for change status, 1 for unhandled errorsSean Whitton2021-11-08
| | | | | | | | When SBCL fails to start up, such as when previously-loaded shared libraries cannot be found while trying to reinvoke a dumped image, it exits 1. We must avoid erroneously interpreting this as a successful attempt to make changes. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :SBCL: avoid adding :DATA hostattrs that persist in *HOST*Sean Whitton2021-11-08
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* REHOME-CONNECTION: move call to UPLOAD-ALL-PREREQUISITE-DATASean Whitton2021-11-08
| | | | | | | | It's the fact we're changing to a different home directory that's part of the same root filesystem, and with the same UID/GID ranges, that means we call UPLOAD-ALL-PREREQUISITE-DATA with this connection object. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add LXC properties, :LXC{,-UNPRIV-ATTACH} connections, WITH-HOMEDIRSean Whitton2021-11-08
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add Linux namespace-entering connectionsSean Whitton2021-11-08
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :SETUID: pass target uid to POSIX-LOGIN-ENVIRONMENT for correct PATHSean Whitton2021-11-01
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add & propagate :NO-SERVICES connattr and respect in LIBVIRT:STARTEDSean Whitton2021-10-29
| | | | | | | | | | | | | | | | | This change was prompted by the realisation that RECONNECTS nullifies any enclosing SERVICE:WITHOUT-STARTING-SERVICES because *HOST* during RECONNECTS is a distinct HOST value, computed at hostattrs time, which can't be affected by an enclosing combinator that works by temporarily pushing hostattrs at :APPLY time. So, for example, if we chroot and subsequently establish a :SETUID connection, properties might try to start services as the non-root user and there is no way for them to know they shouldn't. We can avoid this problem by using a connattr instead because we have a mechanism for propagating connattrs to subsequently established connections. And as in most cases the reason for not starting services is solely due to the way in which we're connecting to the host, a connattr is more appropriate. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :SETUID: avoid creating user's ~/.cache/consfigurator/ owned by rootSean Whitton2021-10-28
| | | | | | This reverts and replaces commit b4eb20904aa8f4ea7ec0ef58eac7889b4b864277. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* rename :XDG-CACHE-HOME connattr to :XDG_CACHE_HOMESean Whitton2021-10-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :SETUID: error when OSICAT:USER-INFO failsSean Whitton2021-10-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :CHROOT.FORK: unshare mount namespace before making temporary mountsSean Whitton2021-10-23
| | | | | | | | | This avoids some cases of interference between the deployment of the chroot and other system activity. For example, before this change, the :ALWAYS-DEPLOYS option to LIBVIRT:KVM-BOOTS-CHROOT{,-FOR} could interact with Virtiofs in such a way as to break the running VM. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* FORK-CONNECTION POST-FORK: note that must not start up any threadsSean Whitton2021-10-23
| | | | | | Per the docstring of EVAL-IN-GRANDCHILD. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* install system deps by searching for package managers on PATHSean Whitton2021-10-23
| | | | | | | | | | | | | | | | With this change we handle the situation in which we don't know the OS of a host on which we need to install system packages more cleanly than before. Also rely on the new PACKAGE:INSTALLED to install the OS bootstrapper in INSTALLER:CLEANLY-INSTALLED-ONCE. This allows us to simplify usage of the property by replacing the ORIGINAL-OS argument with ORIGINAL-OS-ARCHITECTURE. Making this change does mean that we now have two ways to specify the different names a package has on different OSs: (i) something like OS:ETYPECASE where each branch applies a property which invokes an OS-specific package manager; and (ii) the plists supplied to PACKAGE:INSTALLED. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* SHELL-WRAP-CONNECTION %READFILE: insert space before shell "&&"Sean Whitton2021-10-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :SETUID: ensure that the data directory actually existsSean Whitton2021-10-23
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add DEFINE-ERROR-RETVAL-CFUN, CHROOT, CLEARENVSean Whitton2021-10-21
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* :SETUID: use OSICAT:USER-INFO rather than parsing id(1) outputSean Whitton2021-09-09
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* use CFFI, mostly via Osicat, for all syscalls/libc except fork(2)Sean Whitton2021-09-09
| | | | | | | | | | Also replace some calls to chmod(1) with calls to chmod(2). Using CFFI rather than implementation-specific wrappers should be better for portability. Also with this commit we stop hard coding types like uid_t as :UNSIGNED-INT, which was less portable. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* add dep on Anaphora and use APROG1, ALET & AAND in various placesSean Whitton2021-09-08
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* SHELL-WRAP-CONNECTION CONNECTION-WRITEFILE: execute just one commandSean Whitton2021-08-31
| | | | | | Should improve performance, especially when connection latency is high. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>