We are running SLURM 2.3.3 on an x86_64 RHEL 6.2 system with glibc 
version 2.12.

Thanks Mark, and others who have tried to reproduce my situation to no 
avail.

Andy

On 08/24/2012 04:21 PM, Mark A. Grondona wrote:
>
> What version of SLURM and glibc?
>
> I can't get this to reproduce with slurm-2.3 and RHEL6 version
> of glibc.
>
> I think getlogin() is looking at the utmp entry for the tty connected
> to fd 0 (stdin) of the process calling getlogin(3). I am surprised it
> returns anything for normal jobs (no tty), and I'm surprised it works
> for me since I doubt slurm adds a utmp entry.
>
> However, checking utmp for a running job might be interesting, and
> a workaround might involve setting a utmp entry for slurm jobs
> via a plugin.
>
> mark
>
> Andy Riebs <[email protected]> writes:
>> The following trivial program returns "root" when run under SLURM, even
>> though neither SlurmUser nor the current user is root. (Predictably,
>> this is in user code that we can't change.) Is there a configuration
>> setting that we could be using to avoid letting getlogin() think we are
>> root?
>>
>> The program:
>>
>> -----------
>> #include <stdio.h>
>> #include <unistd.h>
>>
>> int
>> main()
>> {
>>           printf("getlogin() returns \"%s\"\n", getlogin());
>>           return 0;
>> }
>> ----------
>>
>> Andy
>>
>> -- 
>> Andy Riebs
>> Hewlett-Packard Company
>> High Performance Computing
>> +1-786-263-9743
>> My opinions are not necessarily those of HP

-- 
Andy Riebs
Hewlett-Packard Company
High Performance Computing
+1-786-263-9743
My opinions are not necessarily those of HP

Reply via email to