Re: [PATCH 1/1] procfs: expose umask in stat and status

From: Pierre Carrier
Date: Sat May 05 2012 - 07:57:51 EST


On Sat, May 5, 2012 at 6:54 AM, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
> Why not use "Umask:\t%#o\n" ? that way you don't get two zeros if the
> umask is zero.

Because of ignorance and laziness.
Just tried "%#o" with v3.4-rc5-182-g71eb557 and got equivalent results
to "0%o", including 0->"00".

So it's agreeably better, even we just don't see it yet.


On Sat, May 5, 2012 at 6:54 AM, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
> It would be good to tell us why we need this, of course.

Oops. I don't have a killer argument.

We happened to look for the information for a running service and
couldn't think of a simple, non-invasive solution.
It feels like it'd be useful to expose it.

I assumed status is a good fit (already has euid, egid and ngroups for example).
AFAICT there wouldn't be any significant security or performance implications.

But I could very well be missing something.


Thanks,

--
Pierre Carrier
Service Reliability Engineer
Spotify AB
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/