[apparmor] [patch] fix aa-unconfined to work in all languages

Seth Arnold seth.arnold at canonical.com
Fri Sep 20 07:07:47 UTC 2013


On Fri, Sep 20, 2013 at 10:10:45AM +0530, Kshitij Gupta wrote:
> If someone will ever read the code they'll probably wonder what LANG=C
> is supposed to do? and in some weird case if it happens that someone
> has netstat with a translation local 'C' (very unlikely ;-) we might
> get into a problem.
> 
> In my opinion use of LANG=en or LANG=en_US seems better (but I maybe wrong).

There's no risk of C being anything but the Good Olde Days:
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
7.11 specifies C as a minimum environment.

POSIX strengthens this, check your setlocale(3posix) manpage (the
opengroup website is busy being broken, so no handy URL; but it's worth
installing the POSIX manpages if you don't have them yet):

       "POSIX"
              Specifies the minimal environment for C-language
              translation called the POSIX locale. If setlocale() is
              not invoked, the POSIX locale is the default at entry
              to main().

       "C"    Equivalent to "POSIX" .


LANG=C is more predictable then en or en_US.

Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130920/2ef690d2/attachment.pgp>


More information about the AppArmor mailing list