Discussion:
bug#21369: Coreutils RHEL 6.7 runuser
(too old to reply)
B***@homedepot.com
2015-08-28 16:51:44 UTC
Permalink
/sbin/runuser issue on RHEL 6.7 when executing `whoami` as tomcat.

Strace -f attached.

Kyle Wooten
Systems Engineer - OSE Linux Engineering
The Home Depot - NewMarket - Atlanta
2221 Newmarket Parkway Marietta Suite 120, GA 30067
Phone: 770-433-8211, Ex. 24889 | Cell: 678-237-5506


________________________________

The information in this Internet Email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Email are subject to the terms and conditions expressed in any applicable governing The Home Depot terms of business or client engagement letter. The Home Depot disclaims all responsibility and liability for the accuracy and content of this attachment and for any damages or losses arising from any inaccuracies, errors, viruses, e.g., worms, trojan horses, etc., or other items of a destructive nature, which may be contained in this attachment and shall not be liable for direct, indirect, consequential or special damages in connection with this e-mail message or its attachment.
Bob Proulx
2015-08-28 19:10:38 UTC
Permalink
tag 21369 + notabug moreinfo
thanks

Hello Billy,

Thank you for your bug report. We always appreciate it when people
take the time to file reports about problems. However your report
isn't as good as it could be. Sorry. I am not saying that it isn't
appreciated. But it could be better.
Post by B***@homedepot.com
/sbin/runuser issue on RHEL 6.7 when executing `whoami` as tomcat.
For one you don't really say what you are expecting. You say there is
a problem with runuser running whoam as tomcat. Instead please show
us exactly what command you were running verbatim. Without having
that we are left to guess. Or to dig it out.

I deduce from the logfile that you ran this command.

# /sbin/runuser -s /bin/ksh - tomcat -c whoami

What was the output of that command? Please always include the
command and the output of the command verbatim. Otherwise we don't
know what it was or we have to dig for it. That is why I tagged this
bug as "moreinfo" needed.
Post by B***@homedepot.com
Strace -f attached.
Wow. That is a huge attachment making the email around 839K on the
initial contact. Please anytime you send something that large
compress the log file first. Using gzip on the log reduces it to 51K
which is much lighter on the mailing lists and everyone's mailboxes.
Mailing lists at lists.gnu.org often have thousands of subscribers and
the bandwidth consumed is multipled by every one.

Also before sending something that large it is useful to make contact
and make sure it is going to be useful. Here I am not sure it is
useful. Because you are stracing 'runuser' which is running 'ksh'
with the '-' option to source the profile and $ENV and then it is
runniing 'whoam'. That is quite the long way around the universe to
get to the end.

For another you are reporting a problem about "Coreutils RHEL 6.7
runuser" but runuser is not a coreutils program. AFAIK runuser comes
from the util-linux package. That isn't something we over here in the
coreutils project have anything to do with. Plus 'ksh'. Plus the
entirety of the (unknown contents of) profile. And then finally the
'whoami' command, which is a coreutils program. Even if we fully
understand what you are reporting it is unlikely we can do anything
about it. That is why I have initially tagged this report as
"notabug" concerning coreutils.
Post by B***@homedepot.com
The information in this Internet Email is confidential and may be
legally privileged. It is intended solely for the addressee. Access
...
And finally there is the useless email disclaimer. We all know and
understand that it is attached by your company and there isn't
anything you can do about it. But those are also useless, annoying,
and legally unenforceable. The usual recommendation is that there are
many free(dom) respecting email providers available that don't abuse
the user's email this way. It is good to use one of them instead.

So where are we? What can we do make this report better? First
please tell us what output comes out of the command. I scanned
through the strace log in some detail but I couldn't dig out of it
what output was actually produced. Or not if none. It is a huge log
file and I couldn't spend a huge amout of time on it.

Then I expect that the problem is related to the use of the runuser
'-' option which sources the (unknown contents of) profile and $ENV.
I have often seen problems due to the code contents of those files.

When you reply please keep the ***@debbugs.gnu.org bug address in
the recipient list. That is the bug log for this report.

Thanks,
Bob

READ CAREFULLY. By reading this email, you agree, on behalf of your
employer, to release me from all obligations and waivers arising from
any and all NON-NEGOTIATED agreements, licences, terms-of-service,
shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure,
non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I
have entered into with your employer, its partners, licensors, agents
and assigns, in perpetuity, without prejudice to my ongoing rights and
privileges. You further represent that you have the authority to
release me from any BOGUS AGREEMENTS on behalf of your employer.
Ondřej Vašík
2015-08-31 07:53:20 UTC
Permalink
Post by Bob Proulx
tag 21369 + notabug moreinfo
thanks
Post by B***@homedepot.com
/sbin/runuser issue on RHEL 6.7 when executing `whoami` as tomcat.
...
Post by Bob Proulx
For another you are reporting a problem about "Coreutils RHEL 6.7
runuser" but runuser is not a coreutils program. AFAIK runuser comes
from the util-linux package. That isn't something we over here in the
coreutils project have anything to do with. Plus 'ksh'. Plus the
entirety of the (unknown contents of) profile. And then finally the
'whoami' command, which is a coreutils program. Even if we fully
understand what you are reporting it is unlikely we can do anything
about it. That is why I have initially tagged this report as
"notabug" concerning coreutils.
Actually, in RHEL 6(.7) is still part of coreutils package - and is
based on su.c (in RHEL 7 it was moved to util-linux). In any case, I
would suggest to use either Red Hat support or filing Red Hat bugzilla
directly - as this issue has nothing to do with current upstream
coreutils.
(thanks Bob for the answers/replies)

Regards,
Ondrej
Assaf Gordon
2018-10-30 09:23:10 UTC
Permalink
tags 21369 notabug
close 21369
stop

(triaging old bugs)
Post by Ondřej Vašík
In any case, I
would suggest to use either Red Hat support or filing Red Hat bugzilla
directly - as this issue has nothing to do with current upstream
coreutils.
Given the above, and no further comments in 3 years,
I'm closing this bug.

-assaf

Bob Proulx
2015-08-28 23:20:05 UTC
Permalink
Here is what we're running on RHEL6.7, and it's throwing 99 as the
return code ($?)
test:/root# /sbin/runuser -s /bin/ksh - tomcat -c whoami
test:/root# echo $?
test:/root# 99
I cannot reproduce your problem on a RHEL 6.7 system here. Therefore
I can only conclude that the problem must be in your local environment.

I am highly suspicious of the '-' option running the tomcat user's
profile and $ENV files. What is in ~tomcat/profile?

Does the command work without the '-'?

/sbin/runuser -s /bin/ksh tomcat -c whoami

Does that command work for other users not tomcat? Perhaps you have
'mysql' already installed? That would make a good alternative test
case if it happens to be there and if you have tomcat then I think it
likely.

/sbin/runuser -s /bin/ksh mysql -c whoami

Looking a little further into strace you submitted I see that pid
23575 appears to be ksh and it appears to have segfaulted.

[pid 23575] --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} ---
[pid 23575] +++ killed by SIGSEGV +++

That isn't good. Can you try a different shell? (On my RHEL 6.7
system /bin/sh is symlinked to bash.) I also have dash installed by
default too and think it would be a good alternative test case.

/sbin/runuser -s /bin/sh - tomcat -c whoami
/sbin/runuser -s /bin/dash - tomcat -c whoami

If 'ksh' is segfaulting then that is likely a problem if not the problem.
Do look closely at the tomcat profile and $ENV (possibly .kshrc)
environment though as I think that is likely involved.

Bob
Continue reading on narkive:
Loading...