IRC logs for #automotive for Thursday, 2020-03-19

*** sherbets has joined #automotive00:10
*** sherbets has quit IRC00:21
*** sherbets has joined #automotive01:10
*** sapiippo has quit IRC01:24
*** sapiippo has joined #automotive01:26
*** sherbets has quit IRC01:36
*** AlisonChaiken has quit IRC02:26
*** sherbets has joined #automotive02:53
*** sherbets has quit IRC04:51
*** sherbets has joined #automotive04:52
*** AlisonChaiken has joined #automotive05:08
*** sherbets has quit IRC05:28
*** AlisonChaiken has quit IRC05:41
*** AlisonChaiken has joined #automotive05:41
*** tgamblin_ has quit IRC06:04
*** tgamblin has joined #automotive06:22
*** AlisonChaiken has quit IRC06:47
*** AlisonChaiken has joined #automotive06:50
*** vrubiolo has joined #automotive07:23
*** jobol has joined #automotive07:27
*** jobol has left #automotive07:29
*** jbpons has joined #automotive07:34
*** khouloud has quit IRC08:07
*** khouloud has joined #automotive08:07
*** ric96 has quit IRC08:08
*** fury has quit IRC08:09
*** ric96 has joined #automotive08:10
*** fury has joined #automotive08:11
*** vrubiolo has quit IRC08:21
*** Newami has joined #automotive09:01
*** Newami has quit IRC09:03
*** vrubiolo has joined #automotive09:36
*** jbpons has quit IRC09:37
*** jbpons has joined #automotive09:40
*** leon-anavi has joined #automotive09:47
*** AlisonChaiken has quit IRC10:55
*** AlisonChaiken has joined #automotive10:56
*** vrubiolo has quit IRC11:30
*** vrubiolo has joined #automotive12:50
*** sherbets has joined #automotive13:29
*** sherbets has quit IRC13:49
*** sherbets has joined #automotive15:30
*** bernardoaraujo_ has joined #automotive16:02
*** walzert has joined #automotive16:26
*** vrubiolo has quit IRC16:44
*** jbpons has quit IRC16:45
bernardoaraujo_hi everyone. I would like some help with AGL filesystem permissions. Here's my scenario:16:55
bernardoaraujo_I appended agl-users_0.1.bb with the following:16:55
bernardoaraujo_USERADD_PARAM_${PN} += "; -u 1008 -r -g my_group my_user;"16:55
bernardoaraujo_GROUPADD_PARAM_${PN} += "; -g 1008 my_group;"16:55
bernardoaraujo_do_install () {16:55
bernardoaraujo_        install -d -m 775 ${D}${localstatedir}/lib/my_app16:55
bernardoaraujo_        chgrp -R my_group ${D}${localstatedir}/lib/my_app16:55
bernardoaraujo_}16:55
bernardoaraujo_When I try to write to /var/lib/my_app as my_user I keep getting "Permission denied".16:55
bernardoaraujo_I wonder if that's related to some security feature of the filesystem?16:55
*** sherbets has quit IRC17:02
*** sherbets has joined #automotive17:08
dl9pfbernardoaraujo_: AGL uses SMACK, so user/group is not the only level of permissions.17:12
bernardoaraujo_dl9pf: thanks for your response. What are the other permission settings that I should set up on the SMACK scheme?17:13
dl9pfyou you expect my_app to run in the UI ?17:16
dl9pfinitially, you can widen permissions with 'chsmack'.17:17
dl9pfBut you'll have to make your app an AGL wgt and install it as such.17:17
dl9pfE.g. check out the current dashboard or hvac as examples.17:18
dl9pfThey're in our git and you can learn how they work from there.17:18
bernardoaraujo_no, it's just a systemd service17:18
bernardoaraujo_that writes into /var/lib/my_app as my_user17:19
dl9pfah ok17:19
bernardoaraujo_are those steps necessary in this case as well?17:21
dl9pfthen try 'chsmack -a "*" /var/lib/my_app'17:23
dl9pfafter that check dmesg for 'audit' message which tell you what was denied.17:23
*** khem has quit IRC17:23
dl9pfwrt smack check out: https://www.kernel.org/doc/html/v4.15/admin-guide/LSM/Smack.html#access-rules17:23
*** khem has joined #automotive17:36
*** klaas has quit IRC17:54
bernardoaraujo_chsmack seems to have worked! thanks!18:07
bernardoaraujo_how to enforce that at build time? is there any recipes I can append for this purpose?18:07
*** amalek has joined #automotive18:47
bernardoaraujo_I appended this to agl-users_0.1.bb as well (after do_install)... maybe not the cleanest solution, but it works19:09
bernardoaraujo_pkg_postinst_ontarget_${PN}() {19:09
bernardoaraujo_        chsmack -a "*" /var/lib/my_app19:09
bernardoaraujo_}19:09
*** sherbets has quit IRC19:35
*** walzert has quit IRC20:04
smurraybernardoaraujo_: what does "my_app" do, exactly?  If it's some type of daemon that's always going to be in the image, just add the user to the static user list and bake it in, none of this would be required20:18
bernardoaraujo_smurray: yes it's a daemon... do you mean meta-agl/meta-agl-profile-core/files/passwd? I was already adding my_user to that list, but I was still getting Permission denied20:20
smurraybernardoaraujo_: do you create the directory under /var/lib in your recipe?  If you do, I'd expect it to end up in the image with the right user and permissions20:23
smurraybernardoaraujo_: if you don't and "my_app" tries to create it at runtime, it would be my expectation that would fail20:23
bernardoaraujo_yes, I've done this process on my own Poky-based distro without problems... this permission issue happened on AGL specifically, and manually running chsmack fixed it20:25
*** sherbets has joined #automotive21:51
*** Newami has joined #automotive23:08
*** psnsilva has joined #automotive23:09
*** leon-anavi has quit IRC23:20
*** psnsilva has quit IRC23:41

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