91 lines
3.0 KiB
91 lines
3.0 KiB
18 years ago
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||
17 years ago
|
#
|
||
18 years ago
|
# Filename: package/.../uclibc/pkg_patch/devfsd-10-uclibc-nis.patch
|
||
|
# Copyright (C) 2006 The OpenSDE Project
|
||
|
# Copyright (C) 2004 - 2006 The T2 SDE Project
|
||
17 years ago
|
#
|
||
18 years ago
|
# More information can be found in the files COPYING and README.
|
||
17 years ago
|
#
|
||
18 years ago
|
# This patch file is dual-licensed. It is available under the license the
|
||
|
# patched project is licensed under, as long as it is an OpenSource license
|
||
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||
|
# of the GNU General Public License as published by the Free Software
|
||
|
# Foundation; either version 2 of the License, or (at your option) any later
|
||
|
# version.
|
||
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
||
|
diff -ur devfsd/devfsd.c devfsd-new/devfsd.c
|
||
|
--- devfsd/devfsd.c 2002-03-25 06:59:40.000000000 +0000
|
||
|
+++ devfsd-new/devfsd.c 2003-05-11 12:03:40.000000000 +0000
|
||
|
@@ -283,8 +283,10 @@
|
||
|
#include <regex.h>
|
||
|
#include <errno.h>
|
||
|
#include <dlfcn.h>
|
||
|
+#ifdef USE_NIS
|
||
|
#include <rpcsvc/ypclnt.h>
|
||
|
#include <rpcsvc/yp_prot.h>
|
||
|
+#endif
|
||
|
#include <karma.h>
|
||
|
#include "devfsd.h"
|
||
|
#include "version.h"
|
||
|
@@ -414,9 +416,11 @@
|
||
|
unsigned long *event_mask);
|
||
|
static void process_config_line (CONST char *line, unsigned long *event_mask);
|
||
|
static void *dlsym_nofail (const char *file, void *handle, char *symbol);
|
||
|
+#ifdef USE_NIS
|
||
|
static int process_yp_line (int instatus, char *inkey, int inkeylen,
|
||
|
char *inval, int invallen, char *indata);
|
||
|
static void load_libnsl (void);
|
||
|
+#endif
|
||
|
static flag do_servicing (int fd, unsigned long event_mask);
|
||
|
static void service_name (const struct devfsd_notify_struct *info);
|
||
|
static void action_permissions (const struct devfsd_notify_struct *info,
|
||
|
@@ -486,9 +490,11 @@
|
||
|
{"fd/2", "stderr"},
|
||
|
{NULL, NULL},
|
||
|
};
|
||
|
+#ifdef USE_NIS
|
||
|
static int (*my_yp_all) (char *domain, char *map,
|
||
|
struct ypall_callback *callback); /* = NULL */
|
||
|
static int (*my_yp_get_default_domain) (char **domainptr); /* = NULL */
|
||
|
+#endif
|
||
|
static struct event_type
|
||
|
{
|
||
|
unsigned int type; /* The DEVFSD_NOTIFY_* value */
|
||
|
@@ -716,6 +722,7 @@
|
||
|
{
|
||
|
if (location[0] == '+')
|
||
|
{
|
||
|
+#ifdef USE_NIS
|
||
|
/* It's a YP map */
|
||
|
struct ypall_callback ypall_cbk;
|
||
|
char *domainname = NULL;
|
||
|
@@ -733,6 +740,9 @@
|
||
|
return;
|
||
|
}
|
||
|
if (optional) return;
|
||
|
+#else
|
||
|
+ SYSLOG (LOG_ERR, "Recompile with -DUSE_NIS to support YP maps.\n");
|
||
|
+#endif
|
||
|
SYSLOG (LOG_ERR, "error reading map: \"%s\"\n", location + 1);
|
||
|
exit (1);
|
||
|
}
|
||
|
@@ -1006,6 +1016,7 @@
|
||
|
return (result);
|
||
|
} /* End Function dlsym_nofail */
|
||
|
|
||
|
+#ifdef USE_NIS
|
||
|
static void load_libnsl (void)
|
||
|
{
|
||
|
#ifdef LIBNSL /* It comes from a shared object */
|
||
|
@@ -1034,6 +1045,7 @@
|
||
|
if (invallen > 0) process_config_line (inval, (unsigned long *) indata);
|
||
|
return (0);
|
||
|
} /* End Function process_yp_line */
|
||
|
+#endif /* USE_NIS */
|
||
|
|
||
|
static flag do_servicing (int fd, unsigned long event_mask)
|
||
|
/* [SUMMARY] Service devfs changes until a signal is received.
|
||
|
Only in devfsd-new: devfsd.o
|
||
|
Only in devfsd-new: expression.o
|