From: Ricardo Wurmus <rekado@elephly.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [RFC] Support for pam_limits.so: “su” is ignored.
Date: Tue, 05 Apr 2016 09:47:46 +0200 [thread overview]
Message-ID: <87inzwzecd.fsf@elephly.net> (raw)
In-Reply-To: <87egam9xnl.fsf@gnu.org>
Ludovic Courtès <ludo@gnu.org> writes:
> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>
> [...]
>
>>> I get:
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> $ ./pre-inst-env guix system build gnu/system/examples/lightweight-desktop.tmpl
>>> substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0%
>>> substitute: updating list of substitutes from 'https://hydra.gnu.org'... 100.0%
>>>
>>> [...]
>>>
>>> /gnu/store/rx31x0m8fk5aknwf754in9yxl7vcq8ls-system
>>> $ grep pam_limit /gnu/store/rx31x0m8fk5aknwf754in9yxl7vcq8ls-system/etc/pam.d/*
>>> /gnu/store/rx31x0m8fk5aknwf754in9yxl7vcq8ls-system/etc/pam.d/login:session required pam_limits.so conf=/etc/security/limits.conf
>>> /gnu/store/rx31x0m8fk5aknwf754in9yxl7vcq8ls-system/etc/pam.d/slim:session required pam_limits.so conf=/etc/security/limits.conf
>>> /gnu/store/rx31x0m8fk5aknwf754in9yxl7vcq8ls-system/etc/pam.d/su:session required pam_limits.so conf=/etc/security/limits.conf
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> Could you try it?
>>
>> I did and I don’t get the same as you do:
>>
>> $ ./pre-inst-env guix system build gnu/system/examples/lightweight-desktop.tmpl
>> substitute: updating list of substitutes from 'https://hydra.gnu.org'... 100.0%
>> The following derivations will be built:
>> /gnu/store/l8r7k5ysw5vkdi67rcz9wx5gl9sxp892-system.drv
>> /gnu/store/5q0rh32ns03y4ndsj1fmsim9zm04x182-activate-service.drv
>> /gnu/store/rvgr25dfw70kf3dyr3mp8w9dmpqsqlll-activate.drv
>> /gnu/store/56d9psa8xcv3i6wqfc01zb39i9sbd7v5-boot.drv
>> /gnu/store/siny40wkak05sqlnmwwsmpxwh93rva1f-gtk-icon-themes.drv
>> /gnu/store/fx5bkg9cz15w90yqximsd678g31blyzk-info-dir.drv
>> /gnu/store/68ri6jqwbg1k15iiyvj3j9a065c22rd1-ca-certificate-bundle.drv
>> /gnu/store/ja6pgayi1qcyf8ffq27s4jimzcq2nm54-profile.drv
>> /gnu/store/50s165xprg605n58i81z49sv1f797vpz-etc.drv
>> /gnu/store/rx31x0m8fk5aknwf754in9yxl7vcq8ls-system
>> $ grep pam_limit /gnu/store/rx31x0m8fk5aknwf754in9yxl7vcq8ls-system/etc/pam.d/*
>> /gnu/store/rx31x0m8fk5aknwf754in9yxl7vcq8ls-system/etc/pam.d/login:session required pam_limits.so conf=/etc/security/limits.conf
>> /gnu/store/rx31x0m8fk5aknwf754in9yxl7vcq8ls-system/etc/pam.d/slim:session required pam_limits.so conf=/etc/security/limits.conf
>
> Crazy stuff.
>
> The ‘/etc-entry’ procedure in (gnu system pam) clearly calls the
> transformation procedure for all the PAM services. I don’t see what
> could go wrong.
I tried this patch on another machine and it works just fine. Weird.
> Could you add a bunch of ’pk’ in this procedure and in your
> ‘pam-extension’ procedure as well and report on that?
I’ll try this later. I did this before and saw that my extension
procedure is in fact called with “su” (and the correct branch is taken),
but it has no effect. I’ll did deeper at some other point.
>> I’m using Guix at commit a754eaf with additional commits to add packages
>> to gnu/packages and the patch I sent earlier to extend the pam files
>> with pam_limits. The only uncommited change is the modification of
>> “gnu/system/examples/lightweight-desktop.tmpl”.
>>
>> Very odd. It’s possible that this is a problem with my setup here. If
>> that’s so, would you be okay with the commit (if it had a proper commit
>> message)?
>
> Yes (and doc :-)).
Oh, right :)
> I haven’t checked the feasibility etc., but eventually, maybe it would
> be best to have Scheme bindings for limits.conf. That way, we could
> write services that extend ‘limits-service-type’ with new limits or
> something.
I’m not very familiar with limits.conf (I only copied the realtime audio
settings from the JACK website), but it looks like the format is very
simple. We could certainly have something like a “limits-entry” to
specify the limits and a matching service.
~~ Ricardo
next prev parent reply other threads:[~2016-04-05 7:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-01 7:01 [RFC] Support for pam_limits.so: “su” is ignored Ricardo Wurmus
2016-04-01 11:00 ` Ludovic Courtès
2016-04-02 7:23 ` Ricardo Wurmus
2016-04-02 14:44 ` Ludovic Courtès
2016-04-02 17:34 ` Ricardo Wurmus
2016-04-03 21:42 ` Ludovic Courtès
2016-04-05 7:47 ` Ricardo Wurmus [this message]
2016-04-05 9:48 ` Ludovic Courtès
2016-07-17 19:52 ` [PATCH] Add pam-limits-service. (was: [RFC] Support for pam_limits.so: “su” is ignored.) Ricardo Wurmus
2016-07-18 12:29 ` [PATCH] Add pam-limits-service Ludovic Courtès
2016-07-20 5:28 ` Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87inzwzecd.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.