(file) Return to getuid.c CVS log (file) (dir) Up to [Development] / JSOC

File: [Development] / JSOC / Attic / getuid.c (download)
Revision: 1.1, Wed Aug 26 17:17:31 2009 UTC (13 years, 9 months ago) by rick
Branch: MAIN
CVS Tags: Ver_DRMSLATEST, VER_DRMSLATEST, NetDRMS_Ver_LATEST, NetDRMS_Ver_9-9, NetDRMS_Ver_8-1, NetDRMS_Ver_8-0, NetDRMS_Ver_7-1, NetDRMS_Ver_7-0, NetDRMS_Ver_6-4, NetDRMS_Ver_6-3, NetDRMS_Ver_6-2, NetDRMS_Ver_6-1, NetDRMS_Ver_6-0, NetDRMS_Ver_2-7, NetDRMS_Ver_2-6, NetDRMS_Ver_2-5, NetDRMS_Ver_2-4, NetDRMS_Ver_2-3, NetDRMS_Ver_2-2, NetDRMS_Ver_2-1, NetDRMS_Ver_2-0b, NetDRMS_Ver_2-0
new function to get sums mgr uid for localization.h file

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

main (int argc, char **argv) {
  uid_t uid = -1;
  char *who = argv[1];
  if (who) {
    struct passwd *pwd = getpwnam (who);
    if (pwd) uid = pwd->pw_uid;
  printf ("%d\n", (unsigned int)uid);
  return 0;

Karen Tian
Powered by
ViewCVS 0.9.4