From 9f43db730363042b049cb6abc02bb090f9d1381b Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Mon, 15 Aug 2016 07:51:36 -0700 Subject: [PATCH] Further cleanup getpwuid usage - try it first (unless completely disabled), and then silently failover to try other methods. --- orte/mca/plm/rsh/plm_rsh_module.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/orte/mca/plm/rsh/plm_rsh_module.c b/orte/mca/plm/rsh/plm_rsh_module.c index 87db11befb5..00454aba785 100644 --- a/orte/mca/plm/rsh/plm_rsh_module.c +++ b/orte/mca/plm/rsh/plm_rsh_module.c @@ -1557,15 +1557,10 @@ static int setup_shell(orte_plm_rsh_shell_t *rshell, struct passwd *p; p = getpwuid(getuid()); - if( NULL == p ) { - /* This user is unknown to the system. Therefore, there is no reason we - * spawn whatsoever in his name. Give up with a HUGE error message. - */ - orte_show_help( "help-plm-rsh.txt", "unknown-user", true, (int)getuid() ); - return ORTE_ERR_FATAL; + if( NULL != p ) { + param = p->pw_shell; + local_shell = find_shell(p->pw_shell); } - param = p->pw_shell; - local_shell = find_shell(p->pw_shell); } #endif