Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
744 B

  1. #include <pwd.h>
  2. #include <grp.h>
  3. #include <stdio.h>
  4. #if 0
  5. struct passwd *getpwuid(uid_t uid)
  6. {
  7. struct passwd *p;
  8. char *name, *dir, *shell;
  9. p = malloc(sizeof(struct passwd));
  10. name = malloc(80);
  11. dir = malloc(80);
  12. shell = malloc(80);
  13. //strcpy(name, "pw_name");
  14. strcpy(name, "informix");
  15. strcpy(dir, "/");
  16. strcpy(shell, "no_shell");
  17. p->pw_name = name;
  18. p->pw_uid = uid;
  19. p->pw_gid = 0x110000;
  20. p->pw_dir = dir;
  21. p->pw_shell = shell;
  22. return p;
  23. }
  24. struct group *getgrgid(gid_t gid)
  25. {
  26. struct group *p;
  27. char *name, *members = NULL;
  28. p = malloc(sizeof(struct group));
  29. name = malloc(80);
  30. // strcpy(name, "gr_name");
  31. strcpy(name, "informix");
  32. p->gr_name = name;
  33. p->gr_gid = gid;
  34. p->gr_mem = members;
  35. return p;
  36. }
  37. #endif