OpenSDE Packages Database (without history before r20070)
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.

90 lines
3.0 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../uclibc/pkg_patch/devfsd-10-uclibc-nis.patch
  5. # Copyright (C) 2006 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This patch file is dual-licensed. It is available under the license the
  11. # patched project is licensed under, as long as it is an OpenSource license
  12. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  13. # of the GNU General Public License as published by the Free Software
  14. # Foundation; either version 2 of the License, or (at your option) any later
  15. # version.
  16. # --- SDE-COPYRIGHT-NOTE-END ---
  17. diff -ur devfsd/devfsd.c devfsd-new/devfsd.c
  18. --- devfsd/devfsd.c 2002-03-25 06:59:40.000000000 +0000
  19. +++ devfsd-new/devfsd.c 2003-05-11 12:03:40.000000000 +0000
  20. @@ -283,8 +283,10 @@
  21. #include <regex.h>
  22. #include <errno.h>
  23. #include <dlfcn.h>
  24. +#ifdef USE_NIS
  25. #include <rpcsvc/ypclnt.h>
  26. #include <rpcsvc/yp_prot.h>
  27. +#endif
  28. #include <karma.h>
  29. #include "devfsd.h"
  30. #include "version.h"
  31. @@ -414,9 +416,11 @@
  32. unsigned long *event_mask);
  33. static void process_config_line (CONST char *line, unsigned long *event_mask);
  34. static void *dlsym_nofail (const char *file, void *handle, char *symbol);
  35. +#ifdef USE_NIS
  36. static int process_yp_line (int instatus, char *inkey, int inkeylen,
  37. char *inval, int invallen, char *indata);
  38. static void load_libnsl (void);
  39. +#endif
  40. static flag do_servicing (int fd, unsigned long event_mask);
  41. static void service_name (const struct devfsd_notify_struct *info);
  42. static void action_permissions (const struct devfsd_notify_struct *info,
  43. @@ -486,9 +490,11 @@
  44. {"fd/2", "stderr"},
  45. {NULL, NULL},
  46. };
  47. +#ifdef USE_NIS
  48. static int (*my_yp_all) (char *domain, char *map,
  49. struct ypall_callback *callback); /* = NULL */
  50. static int (*my_yp_get_default_domain) (char **domainptr); /* = NULL */
  51. +#endif
  52. static struct event_type
  53. {
  54. unsigned int type; /* The DEVFSD_NOTIFY_* value */
  55. @@ -716,6 +722,7 @@
  56. {
  57. if (location[0] == '+')
  58. {
  59. +#ifdef USE_NIS
  60. /* It's a YP map */
  61. struct ypall_callback ypall_cbk;
  62. char *domainname = NULL;
  63. @@ -733,6 +740,9 @@
  64. return;
  65. }
  66. if (optional) return;
  67. +#else
  68. + SYSLOG (LOG_ERR, "Recompile with -DUSE_NIS to support YP maps.\n");
  69. +#endif
  70. SYSLOG (LOG_ERR, "error reading map: \"%s\"\n", location + 1);
  71. exit (1);
  72. }
  73. @@ -1006,6 +1016,7 @@
  74. return (result);
  75. } /* End Function dlsym_nofail */
  76. +#ifdef USE_NIS
  77. static void load_libnsl (void)
  78. {
  79. #ifdef LIBNSL /* It comes from a shared object */
  80. @@ -1034,6 +1045,7 @@
  81. if (invallen > 0) process_config_line (inval, (unsigned long *) indata);
  82. return (0);
  83. } /* End Function process_yp_line */
  84. +#endif /* USE_NIS */
  85. static flag do_servicing (int fd, unsigned long event_mask)
  86. /* [SUMMARY] Service devfs changes until a signal is received.
  87. Only in devfsd-new: devfsd.o
  88. Only in devfsd-new: expression.o