]> git.pld-linux.org Git - packages/zsh.git/blob - zsh-no_nis.patch
- -fomit-frame-pointer on ia32
[packages/zsh.git] / zsh-no_nis.patch
1 diff -Nru zsh-4.0.2/Src/hashtable.c zsh-4.0.2.new/Src/hashtable.c
2 --- zsh-4.0.2/Src/hashtable.c   Sat May 19 11:22:07 2001
3 +++ zsh-4.0.2.new/Src/hashtable.c       Wed Jul 11 20:26:52 2001
4 @@ -1134,17 +1134,6 @@
5  /* Named Directory Hash Table Functions */
6  /****************************************/
7  
8 -#ifdef HAVE_NIS_PLUS
9 -# include <rpcsvc/nis.h>
10 -#else
11 -# ifdef HAVE_NIS
12 -#  include     <rpc/types.h>
13 -#  include     <rpc/rpc.h>
14 -#  include     <rpcsvc/ypclnt.h>
15 -#  include     <rpcsvc/yp_prot.h>
16 -# endif
17 -#endif
18 -
19  /* hash table containing named directories */
20  
21  /**/
22 @@ -1194,121 +1183,11 @@
23  /* Add all the usernames in the password file/database *
24   * to the named directories table.                     */
25  
26 -#ifdef HAVE_NIS_PLUS
27 -static int
28 -add_userdir(nis_name table, nis_object *object, void *userdata)
29 -{
30 -    if (object->zo_data.objdata_u.en_data.en_cols.en_cols_len >= 6) {
31 -       static char name[40], dir[PATH_MAX + 1];
32 -       register entry_col *ec =
33 -           object->zo_data.objdata_u.en_data.en_cols.en_cols_val;
34 -       register int nl = minimum(ec[0].ec_value.ec_value_len, 39);
35 -       register int dl = minimum(ec[5].ec_value.ec_value_len, PATH_MAX);
36 -
37 -       memcpy(name, ec[0].ec_value.ec_value_val, nl);
38 -       name[nl] = '\0';
39 -       memcpy(dir, ec[5].ec_value.ec_value_val, dl);
40 -       dir[dl] = '\0';
41 -
42 -       adduserdir(name, dir, ND_USERNAME, 1);
43 -    }
44 -    return 0;
45 -}
46 -#else
47 -# ifdef HAVE_NIS
48 -static int
49 -add_userdir(int status, char *key, int keylen, char *val, int vallen, char *dummy)
50 -{
51 -    char *p, *d, *de;
52 -
53 -    if (status != YP_TRUE)
54 -       return 1;
55 -
56 -    if (vallen > keylen && *(p = val + keylen) == ':') {
57 -       *p++ = '\0';
58 -       if ((de = strrchr(p, ':'))) {
59 -           *de = '\0';
60 -           if ((d = strrchr(p, ':'))) {
61 -               if (*++d && val[0])
62 -                   adduserdir(val, d, ND_USERNAME, 1);
63 -           }
64 -       }
65 -    }
66 -    return 0;
67 -}
68 -# endif /* HAVE_NIS */
69 -#endif  /* HAVE_NIS_PLUS */
70 -
71  /**/
72  static void
73  fillnameddirtable(HashTable ht)
74  {
75      if (!allusersadded) {
76 -#if defined(HAVE_NIS) || defined(HAVE_NIS_PLUS)
77 -       FILE *pwf;
78 -       char buf[BUFSIZ], *p, *d, *de;
79 -       int skipping, oldct = nameddirtab->ct, usepwf = 1;
80 -
81 -# ifndef HAVE_NIS_PLUS
82 -       char domain[YPMAXDOMAIN];
83 -       struct ypall_callback cb;
84 -
85 -       /* Get potential matches from NIS and cull those without local accounts */
86 -       if (getdomainname(domain, YPMAXDOMAIN) == 0) {
87 -           cb.foreach = (int (*)()) add_userdir;
88 -           cb.data = NULL;
89 -           yp_all(domain, PASSWD_MAP, &cb);
90 -    }
91 -# else  /* HAVE_NIS_PLUS */
92 -       /* Maybe we should turn this string into a #define'd constant...? */
93 -
94 -       nis_list("passwd.org_dir", EXPAND_NAME|ALL_RESULTS|FOLLOW_LINKS|FOLLOW_PATH,
95 -                add_userdir, 0);
96 -# endif
97 -       if (nameddirtab->ct == oldct) {
98 -           /* Using NIS or NIS+ didn't add any user directories. This seems
99 -            * fishy, so we fall back to using getpwent(). If we don't have
100 -            * that, we only use the passwd file. */
101 -#ifdef HAVE_GETPWENT
102 -           struct passwd *pw;
103
104 -           setpwent();
105
106 -           /* loop through the password file/database *
107 -            * and add all entries returned.           */
108 -           while ((pw = getpwent()) && !errflag)
109 -               adduserdir(pw->pw_name, pw->pw_dir, ND_USERNAME, 1);
110
111 -           endpwent();
112 -           usepwf = 0;
113 -#endif /* HAVE_GETPWENT */
114 -       }
115 -       if (usepwf) {
116 -           /* Don't forget the non-NIS matches from the flat passwd file */
117 -           if ((pwf = fopen(PASSWD_FILE, "r")) != NULL) {
118 -               skipping = 0;
119 -               while (fgets(buf, BUFSIZ, pwf) != NULL) {
120 -                   if (strchr(buf, '\n') != NULL) {
121 -                       if (!skipping) {
122 -                           if ((p = strchr(buf, ':')) != NULL) {
123 -                               *p++ = '\0';
124 -                               if ((de = strrchr(p, ':'))) {
125 -                                   *de = '\0';
126 -                                   if ((d = strrchr(p, ':'))) {
127 -                                       if (*++d && buf[0])
128 -                                           adduserdir(buf, d, ND_USERNAME, 1);
129 -                                   }
130 -                               }
131 -                           }
132 -                       } else
133 -                           skipping = 0;
134 -                   } else
135 -                       skipping = 1;
136 -               }
137 -               fclose(pwf);
138 -           }
139 -       }
140 -#else  /* no NIS or NIS_PLUS */
141  #ifdef HAVE_GETPWENT
142         struct passwd *pw;
143   
144 @@ -1321,7 +1200,6 @@
145   
146         endpwent();
147  #endif /* HAVE_GETPWENT */
148 -#endif
149         allusersadded = 1;
150      }
151  }
152 diff -Nru zsh-4.0.2/acconfig.h zsh-4.0.2.new/acconfig.h
153 --- zsh-4.0.2/acconfig.h        Tue Jun 26 12:08:54 2001
154 +++ zsh-4.0.2.new/acconfig.h    Wed Jul 11 20:23:55 2001
155 @@ -4,9 +4,6 @@
156  /* Define this to be the location of your password file */
157  #define PASSWD_FILE "/etc/passwd"
158  
159 -/* Define this to be the name of your NIS/YP password *
160 - * map (if applicable)                                */
161 -#define PASSWD_MAP "passwd.byname"
162  
163  /* Define to 1 if you want user names to be cached */
164  #define CACHE_USERNAMES 1
165 @@ -64,12 +61,6 @@
166  /* Define if your system defines TIOCGWINSZ in sys/ioctl.h.  */
167  #undef GWINSZ_IN_SYS_IOCTL
168  
169 -/* Define to 1 if you have NIS */
170 -#undef HAVE_NIS
171 -
172 -/* Define to 1 if you have NISPLUS */
173 -#undef HAVE_NIS_PLUS
174 -
175  /* Define to 1 if you have RFS superroot directory. */
176  #undef HAVE_SUPERROOT
177  
178 diff -Nru zsh-4.0.2/zshconfig.ac zsh-4.0.2.new/zshconfig.ac
179 --- zsh-4.0.2/zshconfig.ac      Wed Jul 11 20:34:10 2001
180 +++ zsh-4.0.2.new/zshconfig.ac  Wed Jul 11 20:35:02 2001
181 @@ -625,16 +625,6 @@
182  ]);;
183  esac
184  
185 -dnl Some systems (Solaris 2.x, Linux Redhat 5.x) require
186 -dnl libnsl (Network Services Library) to find yp_all
187 -
188 -AC_SEARCH_LIBS(yp_all, nsl)
189 -
190 -dnl I am told that told that unicos reqire these for nis_list
191 -if test `echo $host_os | sed 's/^\(unicos\).*/\1/'` = unicos; then
192 -  LIBS="-lcraylm -lkrb -lnisdb -lnsl -lrpcsvc $LIBS"
193 -fi
194 -
195  if test "x$dynamic" = xyes; then
196    AC_CHECK_LIB(dl, dlopen)
197  fi
198 @@ -1191,27 +1181,6 @@
199    AC_DEFINE(USE_GETCWD)
200  fi
201  
202 -dnl -------------
203 -dnl CHECK FOR NIS
204 -dnl -------------
205 -AC_CACHE_CHECK(for NIS, zsh_cv_sys_nis,
206 -[test -f /usr/bin/ypcat && /usr/bin/ypcat passwd.byname > /dev/null 2>&1 && \
207 -zsh_cv_sys_nis=yes || zsh_cv_sys_nis=no])
208 -if test $zsh_cv_sys_nis = yes; then
209 -  AC_DEFINE(HAVE_NIS)
210 -fi
211 -
212 -dnl -----------------
213 -dnl CHECK FOR NISPLUS
214 -dnl -----------------
215 -AC_CACHE_CHECK(for NIS+, zsh_cv_sys_nis_plus,
216 -[test $ac_cv_func_nis_list = yes && test -f /usr/bin/nisls && \
217 - /usr/bin/nisls > /dev/null 2>&1 && \
218 -zsh_cv_sys_nis_plus=yes || zsh_cv_sys_nis_plus=no])
219 -if test $zsh_cv_sys_nis_plus = yes; then
220 -  AC_DEFINE(HAVE_NIS_PLUS)
221 -fi
222 -
223  dnl ----------------------------------------
224  dnl CHECK FOR LOCATION OF {U,W}TMP{,X} FILES
225  dnl ----------------------------------------
This page took 0.071648 seconds and 3 git commands to generate.