mirror of the now-defunct rocklinux.org
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.

57 lines
1.5 KiB

  1. --- ./lockfile.c.orig 2006-03-26 00:31:19.000000000 +0100
  2. +++ ./lockfile.c 2006-03-26 00:32:04.000000000 +0100
  3. @@ -54,7 +54,7 @@
  4. #ifdef LIB
  5. static
  6. #endif
  7. -int eaccess(char *fn, gid_t gid, struct stat *st)
  8. +int lockfile_eaccess(char *fn, gid_t gid, struct stat *st)
  9. {
  10. struct stat tmp;
  11. uid_t uid = geteuid();
  12. @@ -96,7 +96,7 @@
  13. *p = 0;
  14. else
  15. strcpy(dir, ".");
  16. - if (eaccess(dir, egid, NULL) >= 0) {
  17. + if (lockfile_eaccess(dir, egid, NULL) >= 0) {
  18. free(dir);
  19. return 0;
  20. }
  21. @@ -111,7 +111,7 @@
  22. return 0;
  23. mailgid = st.st_gid;
  24. }
  25. - ret = eaccess(dir, mailgid, NULL) >= 0;
  26. + ret = lockfile_eaccess(dir, mailgid, NULL) >= 0;
  27. free (dir);
  28. return ret;
  29. }
  30. --- ./dotlockfile.c.orig 2006-03-26 00:25:28.000000000 +0100
  31. +++ ./dotlockfile.c 2006-03-26 00:32:47.000000000 +0100
  32. @@ -42,7 +42,7 @@
  33. extern int optind;
  34. #endif
  35. -extern int eaccess(char *, gid_t, struct stat *);
  36. +extern int lockfile_eaccess(char *, gid_t, struct stat *);
  37. /*
  38. * Sleep for an amout of time while regulary checking if
  39. @@ -252,14 +252,14 @@
  40. return L_ERROR;
  41. }
  42. gid = getgid();
  43. - if (eaccess(dir, gid, &st) < 0) {
  44. + if (lockfile_eaccess(dir, gid, &st) < 0) {
  45. if (errno == ENOENT) {
  46. enoent:
  47. if (!quiet) fprintf(stderr,
  48. "dotlockfile: %s: no such directory\n", dir);
  49. return L_TMPLOCK;
  50. }
  51. - if ((r = eaccess(dir, getegid(), &st) < 0) && errno == ENOENT)
  52. + if ((r = lockfile_eaccess(dir, getegid(), &st) < 0) && errno == ENOENT)
  53. goto enoent;
  54. if (r < 0 || !ismaillock(lockfile, pwd->pw_name)) {
  55. if (!quiet) fprintf(stderr,