IRC logs for #buildstream for Wednesday, 2017-06-07

*** tristan has joined #buildstream06:23
*** jude has joined #buildstream06:58
*** ssam2 has joined #buildstream08:27
*** jonathanmaw has joined #buildstream08:40
gitlab-br-botpush on buildstream@master (by Tristan Van Berkom): 1 commit (last: _sandboxbwrap.py: Cleanup debris left behind by bwrap) https://gitlab.com/BuildStream/buildstream/commit/11a6b4e095a4d92be83bac622454228311f2556d08:45
*** tiagogomes has quit IRC08:59
*** tiagogomes has joined #buildstream09:15
gitlab-br-botpush on buildstream@master (by Tristan Van Berkom): 1 commit (last: scriptelement.py: Cosmetic fix; use element names in messages.) https://gitlab.com/BuildStream/buildstream/commit/d17d99446436334190e3328c4ffdc05ab12892b009:28
tristanjjardon[m], can you remind me the branch you were using to test the baserock conversion ?09:37
tristanjonathanmaw, I think we missed a spot with the script element09:37
jonathanmaw?09:37
tristanjonathanmaw, i.e. I think you updated the build-gnome branch of buildstream-tests, which is an example branch of a converted system09:37
tristanBut I have a feeling we may have missed something in the other ?09:37
tristanOr no, I think I'm wrong09:38
tristanI think the baserock conversions dont include a script element automatically09:38
tristanand the only script elements were the initramfs which needs to be added manually after a baserock system autoconversion09:38
ssam2yes09:40
ssam2the scripts are only in the defs2bst README09:40
tristanAh09:41
ssam2jjardon 's branch is jjardon/bst2 of baserock/definitions.git09:41
tristanjonathanmaw, we should update the defs2bst readme to indicate the appropriate new script element syntax09:41
tristanjjardon[m], for what its worth, your autoconversions will now work with master buildstream and master ostree09:42
tristanAarch64 has now built 27 out of 135 steps of meta-gnome-apps-tested.bst, without failing once !09:43
tristanNice09:43
tristanAll of those crazy problems are conveniently swept under the rug for later09:43
tristanBut setuid binaries are going to be a problem, I suspect09:44
tristanSo, actually if anyone has some opinion on this it would be nice to not be the only one thinking about it09:46
tristanThe crux of the issue is explained here: https://mail.gnome.org/archives/ostree-list/2017-June/msg00017.html09:46
tristanBasically, we currently have *some* limitations due to not building as root09:47
tristan A.) No static device nodes09:47
gitlab-br-botpush on buildstream@master (by Tristan Van Berkom): 1 commit (last: _artifactcache.py: Use compressed repositories.) https://gitlab.com/BuildStream/buildstream/commit/70914c8192e23de0d73e844670672c9eb0abc46109:47
tristan B.) No "trusted" xattrs09:47
tristan C.) No assignment of files to arbitrary UIDs09:47
tristanThat seems to be about it09:47
ssam2A is pretty much ignorable right ? nothing modern should need those09:48
ssam2but B and C are a pain09:48
tristanBut, now with user mode checkouts of ostree (which are still currently completely munging permission bits entirely, but we're looking into changing that)09:48
tristanWe additionally have the problem that we cannot checkout suid binaries in the sandbox, and the worst part is, it's a valid concern.09:49
tristanI'm currently working around this by *not* using user mode checkouts, but this just wont work with juergbi's artifact sharing code09:49
ssam2why do we need suid binaries in the sandbox? surely we only need them in the final system ?09:49
tristanssam2, Well two things: we create an image with mkfs.ext2 filesys.img -d ${sysroot}09:50
tristanUserspace utilities which allow you to change permissions of things inside an already created image are limited09:50
tristanWe might have it for ext2 with genext2fs09:51
ssam2fakeroot is an unholy mess, but pretty powerful09:51
tristanssam2, asides from this; there is also the fact that, in order to manually do the job, it means you need to carry that information *beside* the fs tree09:51
tristanSo it's a convoluted steaming pile of horse shit09:51
tristanIf I have to go recording metadata about "this special little file wants to be suid in a deployment"09:52
tristanthen that needs mention, somewhere09:52
tristanssam2, right, and yocto does this with pseudo09:52
tristanwhich may be better09:53
ssam2more or less the same I think09:53
tristanbut they are both unholy09:53
ssam2my gut feeling is it'd be great to avoid such hacks09:53
tristanYes09:53
ssam2but if we want to be able to create the entire OS filesystem locally as non-root, options are pretty limited ...09:53
tristanSo I'm asking the question: If I want to create something which wants to have a setuid root /usr/bin/sudo, Am I willing to own a setuid /usr/bin/sudo myself to get the job done ?09:54
tristanWhat do others think ? How bad is this ?09:54
tristanI'm sure nobody in the room has a multi-user linux system, or if they do; the other users of the same machine are trustable09:55
tristanWe are all admins on our machine09:55
tristanI raised in the email, the possibility that, your automated build machine is also hosting stuff with apache09:55
ssam2thing is, at this point you might as well run the deploy step as root09:55
ssam2safety concerns are more or less the same either way, so i prefer whichever is the simplest approach09:56
tristanand for some crazy reason, you are hosting a cgi script which can hijack your builder user's privileges by accessing an suid file owned by the builder user ?09:56
tristanssam2, I disagree that these are the same09:56
tristanssam2, running as a regular user means that you can be near 100% sure that running a build (which is filesys intensive stuff) never damages your system09:57
tristanAlso it means that you can run the build in the context that you dont have root privileges on a system where you have a login09:58
tristanOwning an suid file is different09:58
ssam2well, yes OK09:58
ssam2then I guess as long as the safety concerns are communicated, it's fine09:58
tristanRight, now I think this could be a moving/progressing issue for BuildStream that we dont necessarily have to solve "Right now"09:59
ssam2but if running as a regular user, how do you end up with a setuid $sandbox/usr/bin/sudo in the first place?09:59
persiaI have both multiuser machines where I don't trust users to behave properly and access to machines where I am not admin, as a counterexample to the one-user-one-admin model.09:59
tristanssam2, any user is allowed to own an suid binary09:59
tristanssam2, it means that if you own an suid sudo, others who have permission to execute it can gain *YOUR* privileges through it10:00
ssam2ahh, ok10:00
tristanssam2, they cannot escalate to root privileges, only yours10:00
persiatristan: For clarity, do you imagine tracking what must be setuid (and for which uid) as metadata, and adjusting at assembly-time?10:00
tristanpersia, thats what I was referring to as "A steaming pile of horse shit" above.10:01
tristana convoluted mess10:01
tristanSome measure of virtualization is preferable to that10:01
persiaYes.  I just wasn't sure if that was acceptance of the mess or argument against it.10:01
tristanI personally want an excuse to keep things simple10:02
tristanNow interestingly, it's also possible that for many use cases, like for instance developers booting a GNOME system, never *really* need the end product to have an suid sudo installed10:02
tristanSo a stop-gap solution until we find something better, is to let the user decide if they want to block ownership of suid binaries in their sandbox, blocked by default10:03
tristanBut allow it in the case that the user wants to build a production system10:03
jonathanmawtristan: https://gitlab.com/BuildStream/defs2bst/merge_requests/2 should update the readme for defs2bst accordingly.10:04
tristanBut "better" solutions currently include yocto pseudo (an LD_PRELOAD library which stores the real permissions in an sqlite database)10:04
tristanOr fakeroot10:04
tristanBoth are arguably horrible hacks, but powerful10:04
tristanssam2, So it actually doesnt end here; because *as it stands*, even if *we* decide that it's okay to let the user, even under only *some* circumstances, own suid binaries10:07
tristanssam2, Currently ostree wont let us do it10:07
tristanSo I need to make the argument that we need that possibility, if we are to have any escape route10:07
ssam2is this is a matter of principle for OSTree or a matter of technical difficulty?10:08
persiatristan: Does the same ostree issue apply to setgid binaries or sticky-bit directories?10:08
tristanpersia, as for your counter example, sure... but how would you answer the question: If you want to build and deploy a production system which contains a setuid /usr/bin/sudo, are you willing to "own" an suid binary in order to do so ?10:09
tristanssam2, principle10:09
ssam2right. In which case the question is whether OSTree wants to be able to hold a "real" OS image, or not10:09
tristanpersia, setgid yes, sticky bit I have no idea, but I'm quite sure no10:09
persiatristan: Yes, because I don't have any *development* environments where I don't have admin over the environment (VM or machine).10:09
ssam2if the answer is no, we're going to have to work around it somehow as we need something that can hold a real OS image10:09
ssam2so I guess the case for OSTree is, do you want us to have to work around your policy?10:10
tristanssam2, So correction (if you read the emails you will get it)... OSTree is perfectly capable currently except for the user mode10:10
persiaThere are all sorts of production needs (or even single-user machine needs) that require setgid and sticky, and in both cases, the majority of applications are for non-root ownership.10:10
tristanssam2, here is the conundrum, I can use "bare" repository mode (which is normally intended for root / ostree-as-host)10:10
tristanssam2, and I will checkout everything exactly as I committed it10:11
tristanssam2, if I committed as a regular user, it will come out belonging to me10:11
tristanssam2, but if I do that, and then push those artifacts to an archive-z2 artifact server, and ANOTHER user tries to checkout those commits...10:11
tristanthen boom, if the other user doesnt also have UID 1000, they're screwed10:12
tristanIf I use the user-mode checkouts, then I can own them automatically with the checking-out-user's UID10:12
tristanBut ostree will munge the permission bits, thinking "This is for running software in a container, regular users who run software in a container should never have suid/sgid binaries"10:13
persiaIf "regular users who run software in a container should never have sgid binaries" is true, then one should never run games in containers, which doesn't entirely seem ideal.10:15
persia(most games are sgid "games", where "games" is a non-0 non-1000 gid)10:15
tristanpersia, I'm not sure that is correct10:16
tristanpersia, for instance, if I run a game in a flatpak under bubblewrap, everything in there is uid 0, it's a container running a process10:16
tristanthere is no real reason in a user namespace to have multiple users, afaict10:17
tristanor maybe there is a runtime user and an app user ?10:17
tristanbut not sure what that buys the container anyway10:17
persiaGames are usually setgid games as a means of setting partial protections on some files vs. other files, to reduce the chance of the user overwriting certain things.  Core datafiles and executables are usually owned by 0, so the setgid binary can't cause issues with them.  Sorting this with only namespaces feels less granular, but maybe?10:19
tristanpersia, its certainly less granular, but the needs are less granular in a container I think10:22
tristanmaybe that wont always be true, though.10:22
tristanpersia, also remember that you probably have an setgid binary that does not belong to you on the system10:23
tristanwhich means by design, someone who executes that binary, gains privilege of that group for the duration of that process10:24
tristanThis is different from owning a setgid binary *yourself*10:24
tristanwhich, if others are allowed to execute it, may escalate their privileges *through you*10:25
persiaYes.  I would only want to own a sgid binary on a development system, where I expected there to be no other users.  Never in production.10:26
ssam2It seems like there's a contradiction in what we're trying to do .. we want to preserve the system exactly as is (with exact UIDs and permission bits), but then check it out a bit differently to how it was (same permission bits but not the same UIDs)10:29
persiaAlthough, for sgid, vs. suid, I don't think the owning user is as important, as long as the owning group is set appropriately (used, for example, with sgid directories in shared team filesystems, where users creating new directories (owned by them) cause the directories to also be owned by the group and sgid.10:30
persiassam2: Ideally, yes.  And we can't rely on name mapping either (some systems have default names like "games" or "daemon" that are used to determine local uid/gid at install-time).10:30
ssam2Can artifacts have files owned by arbitrary UIDs and GIDs or not?10:32
tristanssam2, Right now, as a hack, files in artifacts are all owned by the user; and checkouts are performed without user-mode10:41
tristanssam2, that prevents artifact sharing10:41
tristanssam2, normally, artifacts should have all files belonging to UID 0, and checkouts by the regular user would have them owned by the regular user10:42
tristanssam2, with ybd, everything belongs to UID 010:42
tristanfor instance, we use python TarFile to override the UID and make sure it's always 010:42
tristan(but then we run as root so it makes no difference)10:42
ssam2that doesn't seem right, because in real OSes there can be files owned by arbitrary UIDs and GIDs ...10:42
ssam2(not10:43
tristanactually maybe you are right10:43
ssam2well, not arbitrary as they are defined in /etc/passwd, but you get what I mean10:43
tristanssam2, but to be honest; that's not happening with current baserock defs10:44
ssam2right10:44
ssam2in the past it was possible, because we required the build and deploy to run as root10:44
ssam2there is at least one package which does chown to root as part of `make install` -- i don't like that, but it's there10:45
tristanRight so to add a group or a user to /etc/passwd and /etc/group, requires no special permissions really10:45
tristanYes, chown to root always works, in bubblewrap as well as in chroot10:45
tristanssam2, What typically happens is that at runtime, we tell systemd to run this process/daemon as "pulseaudio" user10:46
tristanfor example10:46
ssam2I see10:46
tristanthats all defined in the service files and whatnot10:46
ssam2there's also systemd-sysusers and the sysusers.d format which seems kinda nice10:47
tristanI do find it odd though10:47
tristanIt seems that daemons and whatnot require owning files under their user10:47
tristanNot sure that all of this is really magically taken care of at boot time10:48
ssam2especially if you don't have systemd10:48
tristanright10:48
tristanNow with bubblewrap, we *could* support arbitrary UID/GIDs, somehow, I think, it's complicated10:49
tristanin a user namespace you are allowed to remap multiple uid/gids10:49
tristanbut it's very contorted if the build system has to know what the build content is going to want10:49
persiaMuch of the setuid/setgid/sticky mangling is done for reasons that could sensibly remap to namespaces in a rearchitected system, but the transition requires fairly deep understanding of the rationale behind each of the historical choices and probably a flag day.10:50
persiaWell, that or CAPABILITIES10:50
tristanpersia, I think a key point here is that the assumption with containers and namespaces, is that A.) A regular user owns some files, and B.) That same user will enter a virtual environment inside those files they own10:51
tristanA container can keep the processes being run contained, but it cannot hide itself from the surrounding system10:52
persiatristan: I don't trust that assumption, really.10:52
tristanOtherwise, what is the purpose of the container ?10:52
persiaSo, it covers cases like group www.10:52
persiaIt is less useful for cases like group pulse or group audio with jack.10:53
persiaand actively false for cases like user mail10:53
tristanpersia, right so, inside a more complex container, one can remap multiple UIDs and such; I'm not familiar with all of these container use cases10:54
persiaIt *might* work for group games, but it might not.10:54
persiaI'm just listing magic uid/gid use cases.10:54
persiaI haven't thought through how to map those in containers.10:54
tristanBut, I could envision some cases where for instance, a container that requires admin privileges to *setup*, will allow remapping of some UIDs and mounting of some real system directories which contain files with special capabilities10:55
tristanpersia, But in those cases, those special files with special capabilities, or suid files, dont ever belong to a regular user10:55
tristanthat would break security outside of the container10:55
tristanOk so anyway, all of this aside, the problem *right now* is user mode checkouts and sacrificing the ability to create systems with any suid binaries at all10:57
persiatristan: At least for group games, there are plenty of sgid binaries.10:57
persiaAlso for group audio10:57
persiaI can't think of any non-root setuid binaries off the top of my head.10:58
ssam2I think the choices are (a) bend OStree to our will, or (b) store ownership and permission info separately to the artifacts11:03
ssam2and (b) breaks down into either fakeroot hacks, or manually specifying permission & ownership info in the .bst files11:03
persiaDo we undestand our will enough for (a)?11:04
ssam2but (a) has the issue that.. even if we bend OSTree to our will, we still can't necessarily check things out as a regular user11:04
persiaThe (real) need to potentially remap ownership without reliable naming in /etc/password makes me think (a) is potentially very difficult.11:04
ssam2and (b) kinda has the same issue that at some point, you have to either avoid the kernel when producing the final system images, or be priviliged so the kernel lets you produce a filesystem with arbitrary permissions11:05
* tristan adds at least one more comment to: https://github.com/ostreedev/ostree/issues/90711:09
* tristan gets back from long meeting12:02
tristanssam2, persia; So with regards to both of these... first; "our will" in the short term, is we want reliable permission bits but we only really need to create systems with files owned by UID 0, because "we have ways" at boot time12:03
tristanLonger term, this can be enhanced12:03
tristanWe should make some separation of what is needed right now for the basics and what would be good to have longer term12:04
persiatristan: For setuid, OK.  For setgid, do you imagine using ways also?  Lastly, how do we track when we need ways?12:04
* persia thinks 99% of sticky bits is done by admins anyway, so less important from a system building perspective12:04
tristansuid & sgid are permissions12:04
tristanWe really, really should be able to get this "right now" even if it is at the expense of owning an suid binary to do so12:05
tristanLonger term, creating files which belong to other uids is something we should be able to do12:05
tristanyocto does this _and_ the suid bits with the pseudo LD_PRELOAD thing, but I hope something better emerges12:06
tristanBut, this leaves us in a bit of a predicament for suid, even in the case that we can have an ostree which lets us create them; we should disable it by default12:07
persiaTo my mind, the blocker is tracking.  It isn't hard to get the right assignments (either the build system thinks it is root and does it or the build system tries it anyway and we trap the error), but it is hard to keep this data available throughout the dataflows involved before delivery to the end state (either user unpack or system deployment).12:07
tristanpersia, right; but this to my mind, is something that can be thought of in the longer term nice to haves; I hope, as long as ostree grants us this wish to be able to checkout suid files as a regular user12:08
tristanSo at the very least, hopefully we dont have to think about this.12:08
tristanwow12:10
tristanOn the bright side12:10
persiaAh, so short-term, artifacts are created with setuid/setgid stuff all configured properly, and if someone checks it out in user-mode, this is flattened, and this is an ostree wishlist to resolve?12:10
tristanMy Aarch64 builds are looking _exactly the same_ as my intel builds12:10
persiaThat's not good.  The ISAs differ enough that you should see at least filesize differences.12:10
jjardon[m]tristan: amazing; thanks. Anything I have to take in account / change in that branch?12:10
tristanpersia, not the binaries12:10
persiaIf they truly produce the same thing, then either we need to be more aggressive about arch-any vs. arch-all, or we need another way to track artifact hashes.12:11
* jjardon[m] reads channel history12:11
tristanpersia, the success rate, everything that succeeds on intel, succeeds on aarch6412:11
* persia is relieved12:11
persiaOh, of course.  We fixed that a couple years ago.12:11
persiaLast I checked, there were only a few remaining bootstraps needing doing (LUAJit, OPC, etc.)12:11
persiaBut nothing in the conventional C-based toolchain12:12
tristanjjardon[m], nope, except maybe ensuring that the gitlab-ci builds ostree master and sets up GI_TYPELIB_PATH/LD_LIBRARY_PATH to ensure we use the master ostree ?12:12
tristanpersia, and I think you misunderstand a bit about checkouts in user mode; the thing is: We _need_ to checkout in user mode, _always_12:13
tristanIn every single build sandbox, we need to checkout in user mode12:13
persiaThen I don't understand the difference you are making between "nice to have" and "need this immediately"12:13
tristanBecause UID/GID ownership of files, is part of the checkout data12:13
tristansigh12:13
tristanThis is frustratingly difficult to explain12:13
persiaI may not need to understand, of course :)12:14
tristanpersia, ok so we can have it one way, or we can have it the other way, but we can not have it both ways.12:14
tristanI can commit and checkout data to an OSTree repo (in "bare" mode), and exactly the same thing that goes in, comes out12:14
tristanThis is fine, for the regular user, or any user.12:14
tristanBUT12:14
tristanIf I want to share that artifact with ANOTHER user12:15
persiaRight, mappings.12:15
tristanThen that user probably doesnt have my UID12:15
tristanSo permission denied12:15
persiaAlso setgid stuff goes wonky in that case.12:15
tristanWhich is why we need user mode checkouts, but we need user mode checkouts which _only_ munge the UID/GID to the active user12:15
persiaUm, for UID, I can see how that might work.12:16
tristanRight now, they strip suid/sgid bits12:16
persiaFor GID, I don't see how it works at all.12:16
tristanNot sure about what you mean by "might work"12:16
persiaOne possible way for it to work (there are many potential implementations).  Essentially, I can comprehend how to go about writing detailed requirements for a system that munged uids as described.12:17
tristanIf I try to create a file that belongs to user "persia" on my machine, it will only succeed because user "tristan" and user "persia" both happen to be UID 100012:17
persiaI cannot comprehend how to do such a thing for GIDs.12:17
tristanBecause almost everyone on their laptop is UID 100012:17
tristanNow dont start putting the sandbox into the equation :)12:18
tristanand UID mapping, that'll just confuse things12:18
tristanWhen I enter the sandbox, *my* UID becomes UID 0, and in the build environment everything is UID 0, inside the sandbox12:18
persiaEven ignoring the sandbox, if we cannot trust there to be entries with shared names in /etc/group, I don't understand how I could construct anbything setgid and have you unpack it properly.12:18
tristanbut in real life, it's UID "tristan"12:18
tristanWe are _only_ talking about ostree here12:18
tristanFirst I checkout data from ostree (which belongs to user "tristan"), run a build in a sandbox, then I exit the sandbox, and the results again belong to UID "tristan"12:19
jjardon[m]tristan: ok, I will try to play with it today12:19
tristanNow I commit the results (belonging to UID "tristan") into the ostree artifact cache12:19
tristanpersia, because inside the sandbox, everything is UID 0, when I go ahead and create a rootfs image, everything in that image is also UID 012:20
tristanSo then an image file gets committed as UID "tristan", with filesystems whos contents all contain stuff that is UID 012:21
* persia does not consider that related to the discussion, and suspects conflation of UID and GID.12:21
persiaIf GID is not considered now, then I have no point, other than the it ought have been :)12:21
tristanOk all the files in OSTree are UID and GID "tristan"12:22
tristanWhen we enter the sandbox, the sandboxed processes see everything as UID/GID 012:22
persiaExcept user GIDs are almost never used for setgid, making that example uninteresting.12:23
tristanThe point here is we're only talking about OSTree, we can have it one way, or the other, but not both12:23
persiaIt's non-root system gids that are the interesting case.12:23
persiaWhich need mapping.12:23
persiaAnd the target user may belong to many groups, but the target user's primary group is almost certainly the incorrect value for the group for the setgid file.12:23
tristanI dont care right now about the meaningfulness of setuid and setgid bits on files, only inasumuch as that they are significant data on a file12:24
tristanLets not get into the meaningfullness and usefulness of them12:24
tristanthey are file metadata12:24
persiaYes.12:24
tristanNow: If I use "bare" repo mode and no "user mode checkout", then they are always recorded and checked out and never lost.12:25
persiaBut, in the setuid case, it is typially safe to assume the owner of the file should have been UID0, so one has some comprehension of the correct setting to use in a sandbox.12:25
tristanBut so is the _ownership_ of the file.12:25
tristanwhich is _always_ UID "tristan"12:25
tristanBecause I invoked buildstream12:25
persiaIn the setgid case, it is not safe to assume the group of a file should be group 0 (or group 1000), so one has to track the *name* of the group in order to capture the permission.12:25
tristanSo it will _always_ work for me12:25
persiaFor UID, yes, it will work for you.12:26
persiaFor GID, it's more complex.12:26
tristanBut when you check out the artifacts I want to share with you, and continue to build the other half of my build on your machine12:26
tristanPermission denied12:26
persiaYes.12:26
tristan_unless_ your user is also UID 100012:26
persiaSure.  That's fixable with fairly trivial mapping solutions.12:26
tristanNow, OSTree has "bare-user" mode and "user mode checkouts", which allow you to checkout the filesystem tree as your user12:27
tristan*BUT*, if you exercise that feature, it will strip away the suid/sgid bits on any checked out files for you12:27
tristanSo you lose data12:27
persiaBut I'm more interested in the issue when something needs to be GID 123 to execute properly, and gets checked out on a system with UID 0, UID 1000, GID 0, GID 1000, and GID 178 (which would be the map, but we need to know why).12:27
tristanNow: I'm trying to convince OSTree maintainers to have some API, method to allow me to checkout files as the active user, but *not* munge any permission bits.12:28
persiaDo I understand that you could cheat, and check them out in bare-user mode inside a sandbox. and get full permissions (for now)?12:30
persiaExcept that you'd need some way of mapping "tristan" as UID 1000 to "persia" as UID 1001?12:31
persiaOtherwise I'd get "permission denied" if I tried to do anything?12:31
tristanFirst of all, I dont want to ever do that, it will make the engine complex12:32
tristanArtifact staging and collection happens outside of the sandbox12:32
tristanIn order to prepare a sandbox or collect output from it12:32
* persia was imagining an epheremal sandbox used only to lie about UID to ostree12:32
persiaErr, ephemeral12:33
tristanYeah, baggage to carry, really dont like it12:33
tristanOn the other hand, I'm looking at one or two lines of code in ostree which decide to munge SUID/SGID bits12:34
tristannot so much baggage12:34
tristanAlso, I'm not really entirely convinced that it would work12:34
persiaI suspect the best thing for me to do is wait until those are adjusted, and then explore the setgid edge cases :)12:34
tristanOr even if it's possible12:35
persiaIt is possible, if the unpacking user has the right capabilities or access to a constrained environment with elevated capabilities.  After unpacking, the unpacked results could be used for privilege escalation (as you discussed before).  It might not actually make a working system, but it might be close enough for development testing.12:36
tristanRight, for a privileged user12:37
tristanBut we've avoided the need of being root for any element processing so far; yocto builds systems fine without ever being root, yuck12:37
tristanright ?12:38
tristanNow, currently actually the ostree code is wrong and being fixed anyway:12:39
tristanhttps://github.com/ostreedev/ostree/pull/908/commits/5fb31fde40a87b76560fe5f0c28ffe697f11073112:39
tristanThe previous lack of suid/sgid stripping was a mistake12:40
tristanThe OR'ing of 0755 is something nobody knows why the hell they were ever doing that to begin with12:40
tristanBut if I at _least_ have my way with that patch (last comment here: https://github.com/ostreedev/ostree/issues/907)12:41
tristanThen _only_ the SUID/SGID will be munged, and we deal with that separately; hopefully I can get _some_ kind of patch in for it12:41
* tristan is losing hair over this :-S12:41
ssam2given that the existing best practice is Fakeroot, we can safely say it's a hard problem12:43
persia+112:45
persiaIn Debian, in addition to use of fakeroot, there is elaborate additional machinery used to ensure gid mappings for setgid stuff.12:45
tristanindeed its a hard problem12:47
tristanBut we can very well live with a situation without SUID/SGID munging in user mode checkouts and have a _lot_ of the desired functionality12:48
tristanbefore having to wallow in fakeroot/pseudo territory12:48
tristanwe only really need that for creation of files owned by arbitrary uids/gids12:49
tristanafaics, fakeroot also virtualizes static dev nodes, but noone needs that12:49
tristanand root capability xattrs are not really that common12:49
tristanalso assignment of daemons' file ownership is something I believe systemd can manage at boot time, so for a minority of systems which actually dare run systemd </snark> we dont even really need the uid/gid bits12:51
* tristan has to go out for dinner12:52
tristanI'll try to not think about this tomorrow and punt the artifact sharing problem to next week if I can manage12:52
tristanBut I really wanted to land that12:52
*** tristan has quit IRC12:57
*** jude has quit IRC13:31
*** jude has joined #buildstream13:34
*** jude has quit IRC14:37
*** luisa has joined #buildstream14:38
luisaLook how I'm fucking online → http://best-sexchat.top14:40
*** luisa has quit IRC14:41
*** jude has joined #buildstream15:17
*** jude has quit IRC16:04
*** jude has joined #buildstream16:20
*** jude has quit IRC16:32
*** jonathanmaw has quit IRC16:48
*** ssam2 has quit IRC17:04
*** jude has joined #buildstream19:34
*** jude has quit IRC19:48
*** jude has joined #buildstream20:05
*** jude has quit IRC20:46
*** albfan[m] has quit IRC21:24
*** mattiasb has quit IRC21:24
*** jjardon[m] has quit IRC21:24
*** waltervargas[m] has quit IRC21:24
*** persia has quit IRC21:24
*** juergbi has quit IRC21:24
*** ironfoot has quit IRC21:24
*** persia has joined #buildstream21:25
*** juergbi has joined #buildstream21:25
*** ironfoot has joined #buildstream21:25
*** irc.poop.nl sets mode: +o ironfoot21:25
*** albfan[m] has joined #buildstream21:40
*** jjardon[m] has joined #buildstream21:45
*** mattiasb has joined #buildstream21:46
*** Abu has joined #buildstream21:54
*** Abu has quit IRC21:55
*** mattiasb has quit IRC22:00
*** jjardon[m] has quit IRC22:00
*** albfan[m] has quit IRC22:00
*** waltervargas[m] has joined #buildstream22:59
*** albfan[m] has joined #buildstream23:22

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!