Re: getpwuid returning null

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

 



>>  #include <unistd.h>
>>  #include <sys/types.h>
>>  #include <stdio.h>

Isn't #include <pwd.h> missing here?

Also check errno like Martin suggests. For this you need #include <errno.h> and
make sure you set errno=0 before you call getpwuid.

Cheers, Mark.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux