`<div dir="ltr">On Fri, Aug 29, 2014 at 7:55 AM, Lauri Tirkkonen <span dir="ltr"><<a href="mailto:lotheac@iki.fi" target="_blank">lotheac@iki.fi</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't know whether this is a distribution bug or exists in upstream<br>
illumos so I'm reporting it here.<br>
<br>
I assumed since the base install, ie. pkg:/SUNWcs, ships<br>
{auth,exec,prof,user}_attr.d directories and a file in them, that you<br>
could drop a file in one of them and have it function similarly to<br>
appending to the _attr file. This is, however, not the case for at least<br>
user_attr:<br></blockquote><div><br></div><div>The directories contains fragments that are used as part of self<br>assembly to construct the resulting file (and it's the file such as<br></div><div>/etc/user_attr that is actually used by the system).<br>
<br></div><div>So, if you add additional files into these directories, you need to<br>trigger self-assembly. Normally, packages delivering additional<br>fragments to these .d directories will do so automatically, but<br>otherwise you can force the update yourself:<br>
<br></div><div>svcadm restart rbac<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
gutsman /etc # useradd foo<br>
gutsman /etc # auths foo<br>
solaris.admin.wusb.read,solaris.device.cdrw,solaris.device.mount.removable,solaris.mail.mailq,solaris.profmgr.read<br>
gutsman /etc # echo 'foo::::type=normal;auths=bar' > user_attr.d/foo<br>
gutsman /etc # auths foo<br>
solaris.admin.wusb.read,solaris.device.cdrw,solaris.device.mount.removable,solaris.mail.mailq,solaris.profmgr.read<br>
gutsman /etc # cat user_attr.d/foo >> user_attr<br>
gutsman /etc # auths foo<br>
bar,solaris.admin.wusb.read,solaris.device.cdrw,solaris.device.mount.removable,solaris.mail.mailq,solaris.profmgr.read<br>
<br>
A quick look also didn't turn up any code that would handle these<br>
directories (but I can be wrong). I think that these directories should<br>
not be shipped at all -- it could lead to security problems in the worst<br>
case (think shipping a setuid binary and a file in exec_attr.d to set<br>
Forced Privilege on it; I actually did this in one of our packages but I<br>
guess it's probably not limiting privileges at all).<br>
<br>
The .d directories are not referenced in any manual pages, though, but<br>
it's still a bad idea to ship files which serve no purpose (as far as I<br>
can tell :) and may confuse users.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Lauri Tirkkonen | <a href="tel:%2B358%2050%205341376" value="+358505341376">+358 50 5341376</a> | lotheac @ IRCnet<br>
_______________________________________________<br>
OmniOS-discuss mailing list<br>
<a href="mailto:OmniOS-discuss@lists.omniti.com">OmniOS-discuss@lists.omniti.com</a><br>
<a href="http://lists.omniti.com/mailman/listinfo/omnios-discuss" target="_blank">http://lists.omniti.com/mailman/listinfo/omnios-discuss</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>-Peter Tribble<br><a href="http://www.petertribble.co.uk/">http://www.petertribble.co.uk/</a> - <a href="http://ptribble.blogspot.com/">http://ptribble.blogspot.com/</a>
</div></div>
`