[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cuserid(buf)



hi Thorsten
The spec is the Single UNIX Specification V2.
SUSv2 says:

    If s is not a null pointer, s is returned. If s is not a null
    pointer and the login name cannot be found, the null byte '\0'
    will be placed at *s.

regards
Andrew

On Dec 10,  1:21pm in "cuserid(buf)", Thorsten Kukuk wrote:
>
> Hi,
>
> For me, the cuserid 3 test always fails:
>
>         /tset/LSB.os/procenv/cuserid/T.cuserid 3        Failed
>
>                 Test Information:
>         cuserid(buf) did not return buf
>         current effective user ID is 25000 (VSX_UNUSED_UID)
>
>
> ID 25000 is not known to the system. Since cuserid is dropped from
> the current standards, I'm not sure if the test case is wrong or
> glibc. All manual pages say, that, if a userid does not exists,
> NULL should be returned. This is, was glibc do.
>
> Does somebody has a standard where cuserid is descriped and can
> tell me, what the correct return code is if the uid does not exists ?
> Looks like the test case expects the user supplied buffer without
> contents. Can somebody verify this?
>
>   Thanks,
>    Thorsten



Reply to: