1 /* Copyright (C) 1996,1997,1998,1999,2001,2002 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
25 #include <bits/libc-lock.h>
27 #include <rpcsvc/yp.h>
28 #include <rpcsvc/ypclnt.h>
29 #include <rpcsvc/nis.h>
32 #include "nss-nisplus.h"
33 #include "nisplus-parser.h"
35 static service_user
*ni
;
36 static bool_t use_nisplus
; /* default: group_compat: nis */
37 static nis_name grptable
; /* Name of the group table */
38 static size_t grptablelen
;
40 /* Get the declaration of the parser function. */
42 #define STRUCTURE group
44 #include <nss/nss_files/files-parse.c>
46 /* Structure for remembering -group members ... */
47 #define BLACKLIST_INITIAL_SIZE 512
48 #define BLACKLIST_INCREMENT 256
64 struct blacklist_t blacklist
;
66 typedef struct ent_t ent_t
;
68 static ent_t ext_ent
= {0, 0, NULL
, 0, NULL
, NULL
, {NULL
, 0, 0}};
70 /* Protect global state against multiple changers. */
71 __libc_lock_define_initialized (static, lock
)
73 /* Prototypes for local functions. */
74 static void blacklist_store_name (const char *, ent_t
*);
75 static int in_blacklist (const char *, int, ent_t
*);
77 static enum nss_status
78 _nss_first_init (void)
82 __nss_database_lookup ("group_compat", NULL
, "nis", &ni
);
83 use_nisplus
= (strcmp (ni
->name
, "nisplus") == 0);
88 static const char key
[] = "group.org_dir.";
89 const char *local_dir
= nis_local_directory ();
90 size_t len_local_dir
= strlen (local_dir
);
92 grptable
= malloc (sizeof (key
) + len_local_dir
);
94 return NSS_STATUS_TRYAGAIN
;
96 grptablelen
= ((char *) mempcpy (mempcpy (grptable
,
97 key
, sizeof (key
) - 1),
98 local_dir
, len_local_dir
+ 1)
102 return NSS_STATUS_SUCCESS
;
105 static enum nss_status
106 internal_setgrent (ent_t
*ent
)
108 enum nss_status status
= NSS_STATUS_SUCCESS
;
110 ent
->nis
= ent
->nis_first
= 0;
112 if (_nss_first_init () != NSS_STATUS_SUCCESS
)
113 return NSS_STATUS_UNAVAIL
;
115 if (ent
->oldkey
!= NULL
)
122 if (ent
->result
!= NULL
)
124 nis_freeresult (ent
->result
);
128 if (ent
->blacklist
.data
!= NULL
)
130 ent
->blacklist
.current
= 1;
131 ent
->blacklist
.data
[0] = '|';
132 ent
->blacklist
.data
[1] = '\0';
135 ent
->blacklist
.current
= 0;
137 if (ent
->stream
== NULL
)
139 ent
->stream
= fopen ("/etc/group", "r");
141 if (ent
->stream
== NULL
)
142 status
= errno
== EAGAIN
? NSS_STATUS_TRYAGAIN
: NSS_STATUS_UNAVAIL
;
145 /* We have to make sure the file is `closed on exec'. */
148 result
= flags
= fcntl (fileno (ent
->stream
), F_GETFD
, 0);
152 result
= fcntl (fileno (ent
->stream
), F_SETFD
, flags
);
156 /* Something went wrong. Close the stream and return a
158 fclose (ent
->stream
);
160 status
= NSS_STATUS_UNAVAIL
;
165 rewind (ent
->stream
);
172 _nss_compat_setgrent (int stayopen
)
174 enum nss_status result
;
176 __libc_lock_lock (lock
);
178 result
= internal_setgrent (&ext_ent
);
180 __libc_lock_unlock (lock
);
186 static enum nss_status
187 internal_endgrent (ent_t
*ent
)
189 if (ent
->stream
!= NULL
)
191 fclose (ent
->stream
);
195 ent
->nis
= ent
->nis_first
= 0;
197 if (ent
->oldkey
!= NULL
)
204 if (ent
->result
!= NULL
)
206 nis_freeresult (ent
->result
);
210 if (ent
->blacklist
.data
!= NULL
)
212 ent
->blacklist
.current
= 1;
213 ent
->blacklist
.data
[0] = '|';
214 ent
->blacklist
.data
[1] = '\0';
217 ent
->blacklist
.current
= 0;
219 return NSS_STATUS_SUCCESS
;
223 _nss_compat_endgrent (void)
225 enum nss_status result
;
227 __libc_lock_lock (lock
);
229 result
= internal_endgrent (&ext_ent
);
231 __libc_lock_unlock (lock
);
236 static enum nss_status
237 getgrent_next_nis (struct group
*result
, ent_t
*ent
, char *buffer
,
238 size_t buflen
, int *errnop
)
240 struct parser_data
*data
= (void *) buffer
;
242 char *outkey
, *outval
;
243 int outkeylen
, outvallen
, parse_res
;
246 if (yp_get_default_domain (&domain
) != YPERR_SUCCESS
)
249 return NSS_STATUS_NOTFOUND
;
256 bool_t save_nis_first
;
260 if (yp_first (domain
, "group.byname", &outkey
, &outkeylen
,
261 &outval
, &outvallen
) != YPERR_SUCCESS
)
264 return NSS_STATUS_UNAVAIL
;
267 if ( buflen
< ((size_t) outvallen
+ 1))
271 return NSS_STATUS_TRYAGAIN
;
274 save_oldkey
= ent
->oldkey
;
275 save_oldlen
= ent
->oldkeylen
;
276 save_nis_first
= TRUE
;
277 ent
->oldkey
= outkey
;
278 ent
->oldkeylen
= outkeylen
;
279 ent
->nis_first
= FALSE
;
283 if (yp_next (domain
, "group.byname", ent
->oldkey
, ent
->oldkeylen
,
284 &outkey
, &outkeylen
, &outval
, &outvallen
)
288 return NSS_STATUS_NOTFOUND
;
291 if ( buflen
< ((size_t) outvallen
+ 1))
295 return NSS_STATUS_TRYAGAIN
;
298 save_oldkey
= ent
->oldkey
;
299 save_oldlen
= ent
->oldkeylen
;
300 save_nis_first
= FALSE
;
301 ent
->oldkey
= outkey
;
302 ent
->oldkeylen
= outkeylen
;
305 /* Copy the found data to our buffer... */
306 p
= strncpy (buffer
, outval
, buflen
);
308 /* ...and free the data. */
314 parse_res
= _nss_files_parse_grent (p
, result
, data
, buflen
, errnop
);
318 ent
->oldkey
= save_oldkey
;
319 ent
->oldkeylen
= save_oldlen
;
320 ent
->nis_first
= save_nis_first
;
322 return NSS_STATUS_TRYAGAIN
;
331 in_blacklist (result
->gr_name
, strlen (result
->gr_name
), ent
))
332 parse_res
= 0; /* if result->gr_name in blacklist,search next entry */
336 return NSS_STATUS_SUCCESS
;
339 static enum nss_status
340 getgrent_next_nisplus (struct group
*result
, ent_t
*ent
, char *buffer
,
341 size_t buflen
, int *errnop
)
347 nis_result
*save_oldres
;
348 bool_t save_nis_first
;
352 save_oldres
= ent
->result
;
353 save_nis_first
= TRUE
;
354 ent
->result
= nis_first_entry(grptable
);
355 if (niserr2nss (ent
->result
->status
) != NSS_STATUS_SUCCESS
)
358 return niserr2nss (ent
->result
->status
);
360 ent
->nis_first
= FALSE
;
366 save_oldres
= ent
->result
;
367 save_nis_first
= FALSE
;
368 res
= nis_next_entry(grptable
, &ent
->result
->cookie
);
370 if (niserr2nss (ent
->result
->status
) != NSS_STATUS_SUCCESS
)
373 return niserr2nss (ent
->result
->status
);
376 parse_res
= _nss_nisplus_parse_grent (ent
->result
, 0, result
,
377 buffer
, buflen
, errnop
);
380 nis_freeresult (ent
->result
);
381 ent
->result
= save_oldres
;
382 ent
->nis_first
= save_nis_first
;
384 return NSS_STATUS_TRYAGAIN
;
389 nis_freeresult (save_oldres
);
393 in_blacklist (result
->gr_name
, strlen (result
->gr_name
), ent
))
394 parse_res
= 0; /* if result->gr_name in blacklist,search next entry */
398 return NSS_STATUS_SUCCESS
;
401 /* This function handle the +group entrys in /etc/group */
402 static enum nss_status
403 getgrnam_plusgroup (const char *name
, struct group
*result
, char *buffer
,
404 size_t buflen
, int *errnop
)
406 struct parser_data
*data
= (void *) buffer
;
409 if (use_nisplus
) /* Do the NIS+ query here */
412 char buf
[strlen (name
) + 24 + grptablelen
];
414 sprintf(buf
, "[name=%s],%s", name
, grptable
);
415 res
= nis_list(buf
, FOLLOW_PATH
| FOLLOW_LINKS
, NULL
, NULL
);
416 if (niserr2nss (res
->status
) != NSS_STATUS_SUCCESS
)
418 enum nss_status status
= niserr2nss (res
->status
);
420 nis_freeresult (res
);
423 parse_res
= _nss_nisplus_parse_grent (res
, 0, result
, buffer
, buflen
,
427 nis_freeresult (res
);
429 return NSS_STATUS_TRYAGAIN
;
431 nis_freeresult (res
);
435 char *domain
, *outval
, *p
;
438 if (yp_get_default_domain (&domain
) != YPERR_SUCCESS
)
439 return NSS_STATUS_NOTFOUND
;
441 if (yp_match (domain
, "group.byname", name
, strlen (name
),
442 &outval
, &outvallen
) != YPERR_SUCCESS
)
443 return NSS_STATUS_NOTFOUND
;
445 if (buflen
< ((size_t) outvallen
+ 1))
449 return NSS_STATUS_TRYAGAIN
;
452 /* Copy the found data to our buffer... */
453 p
= strncpy (buffer
, outval
, buflen
);
455 /* ... and free the data. */
459 parse_res
= _nss_files_parse_grent (p
, result
, data
, buflen
, errnop
);
461 return NSS_STATUS_TRYAGAIN
;
465 /* We found the entry. */
466 return NSS_STATUS_SUCCESS
;
468 return NSS_STATUS_RETURN
;
471 static enum nss_status
472 getgrent_next_file (struct group
*result
, ent_t
*ent
,
473 char *buffer
, size_t buflen
, int *errnop
)
475 struct parser_data
*data
= (void *) buffer
;
484 fgetpos (ent
->stream
, &pos
);
485 buffer
[buflen
- 1] = '\xff';
486 p
= fgets (buffer
, buflen
, ent
->stream
);
487 if (p
== NULL
&& feof (ent
->stream
))
488 return NSS_STATUS_NOTFOUND
;
490 if (p
== NULL
|| buffer
[buflen
- 1] != '\xff')
492 fsetpos (ent
->stream
, &pos
);
494 return NSS_STATUS_TRYAGAIN
;
497 /* Terminate the line for any case. */
498 buffer
[buflen
- 1] = '\0';
500 /* Skip leading blanks. */
504 while (*p
== '\0' || *p
== '#' || /* Ignore empty and comment lines. */
505 /* Parse the line. If it is invalid, loop to
506 get the next line of the file to parse. */
507 !(parse_res
= _nss_files_parse_grent (p
, result
, data
, buflen
,
512 /* The parser ran out of space. */
513 fsetpos (ent
->stream
, &pos
);
515 return NSS_STATUS_TRYAGAIN
;
518 if (result
->gr_name
[0] != '+' && result
->gr_name
[0] != '-')
519 /* This is a real entry. */
523 if (result
->gr_name
[0] == '-' && result
->gr_name
[1] != '\0'
524 && result
->gr_name
[1] != '@')
526 blacklist_store_name (&result
->gr_name
[1], ent
);
531 if (result
->gr_name
[0] == '+' && result
->gr_name
[1] != '\0'
532 && result
->gr_name
[1] != '@')
534 enum nss_status status
;
536 /* Store the group in the blacklist for the "+" at the end of
538 blacklist_store_name (&result
->gr_name
[1], ent
);
539 status
= getgrnam_plusgroup (&result
->gr_name
[1], result
, buffer
,
541 if (status
== NSS_STATUS_SUCCESS
) /* We found the entry. */
544 if (status
== NSS_STATUS_RETURN
/* We couldn't parse the entry */
545 || status
== NSS_STATUS_NOTFOUND
) /* No group in NIS */
549 if (status
== NSS_STATUS_TRYAGAIN
)
551 /* The parser ran out of space. */
552 fsetpos (ent
->stream
, &pos
);
560 if (result
->gr_name
[0] == '+' && result
->gr_name
[1] == '\0')
563 ent
->nis_first
= TRUE
;
566 return getgrent_next_nisplus (result
, ent
, buffer
, buflen
, errnop
);
568 return getgrent_next_nis (result
, ent
, buffer
, buflen
, errnop
);
572 return NSS_STATUS_SUCCESS
;
576 static enum nss_status
577 internal_getgrent_r (struct group
*gr
, ent_t
*ent
, char *buffer
,
578 size_t buflen
, int *errnop
)
583 return getgrent_next_nisplus (gr
, ent
, buffer
, buflen
, errnop
);
585 return getgrent_next_nis (gr
, ent
, buffer
, buflen
, errnop
);
588 return getgrent_next_file (gr
, ent
, buffer
, buflen
, errnop
);
592 _nss_compat_getgrent_r (struct group
*grp
, char *buffer
, size_t buflen
,
595 enum nss_status status
= NSS_STATUS_SUCCESS
;
597 __libc_lock_lock (lock
);
599 /* Be prepared that the setgrent function was not called before. */
600 if (ext_ent
.stream
== NULL
)
601 status
= internal_setgrent (&ext_ent
);
603 if (status
== NSS_STATUS_SUCCESS
)
604 status
= internal_getgrent_r (grp
, &ext_ent
, buffer
, buflen
, errnop
);
606 __libc_lock_unlock (lock
);
611 /* Searches in /etc/group and the NIS/NIS+ map for a special group */
612 static enum nss_status
613 internal_getgrnam_r (const char *name
, struct group
*result
, ent_t
*ent
,
614 char *buffer
, size_t buflen
, int *errnop
)
616 struct parser_data
*data
= (void *) buffer
;
625 fgetpos (ent
->stream
, &pos
);
626 buffer
[buflen
- 1] = '\xff';
627 p
= fgets (buffer
, buflen
, ent
->stream
);
628 if (p
== NULL
&& feof (ent
->stream
))
629 return NSS_STATUS_NOTFOUND
;
631 if (p
== NULL
|| buffer
[buflen
- 1] != '\xff')
633 fsetpos (ent
->stream
, &pos
);
635 return NSS_STATUS_TRYAGAIN
;
638 /* Terminate the line for any case. */
639 buffer
[buflen
- 1] = '\0';
641 /* Skip leading blanks. */
645 while (*p
== '\0' || *p
== '#' || /* Ignore empty and comment lines. */
646 /* Parse the line. If it is invalid, loop to
647 get the next line of the file to parse. */
648 !(parse_res
= _nss_files_parse_grent (p
, result
, data
, buflen
,
653 /* The parser ran out of space. */
654 fsetpos (ent
->stream
, &pos
);
656 return NSS_STATUS_TRYAGAIN
;
659 /* This is a real entry. */
660 if (result
->gr_name
[0] != '+' && result
->gr_name
[0] != '-')
662 if (strcmp (result
->gr_name
, name
) == 0)
663 return NSS_STATUS_SUCCESS
;
669 if (result
->gr_name
[0] == '-' && result
->gr_name
[1] != '\0')
671 if (strcmp (&result
->gr_name
[1], name
) == 0)
672 return NSS_STATUS_NOTFOUND
;
678 if (result
->gr_name
[0] == '+' && result
->gr_name
[1] != '\0')
680 if (strcmp (name
, &result
->gr_name
[1]) == 0)
682 enum nss_status status
;
684 status
= getgrnam_plusgroup (name
, result
, buffer
, buflen
,
686 if (status
== NSS_STATUS_RETURN
)
687 /* We couldn't parse the entry */
694 if (result
->gr_name
[0] == '+' && result
->gr_name
[1] == '\0')
696 enum nss_status status
;
698 status
= getgrnam_plusgroup (name
, result
, buffer
, buflen
, errnop
);
699 if (status
== NSS_STATUS_RETURN
)
700 /* We couldn't parse the entry */
707 return NSS_STATUS_SUCCESS
;
711 _nss_compat_getgrnam_r (const char *name
, struct group
*grp
,
712 char *buffer
, size_t buflen
, int *errnop
)
714 ent_t ent
= {0, 0, NULL
, 0, NULL
, NULL
, {NULL
, 0, 0}};
715 enum nss_status status
;
717 if (name
[0] == '-' || name
[0] == '+')
718 return NSS_STATUS_NOTFOUND
;
720 __libc_lock_lock (lock
);
722 status
= internal_setgrent (&ent
);
724 __libc_lock_unlock (lock
);
726 if (status
!= NSS_STATUS_SUCCESS
)
729 status
= internal_getgrnam_r (name
, grp
, &ent
, buffer
, buflen
, errnop
);
731 internal_endgrent (&ent
);
736 /* This function handle the + entry in /etc/group */
737 static enum nss_status
738 getgrgid_plusgroup (gid_t gid
, struct group
*result
, char *buffer
,
739 size_t buflen
, int *errnop
)
741 struct parser_data
*data
= (void *) buffer
;
744 if (use_nisplus
) /* Do the NIS+ query here */
747 char buf
[24 + grptablelen
];
749 sprintf(buf
, "[gid=%lu],%s", (unsigned long int) gid
, grptable
);
750 res
= nis_list(buf
, FOLLOW_PATH
| FOLLOW_LINKS
, NULL
, NULL
);
751 if (niserr2nss (res
->status
) != NSS_STATUS_SUCCESS
)
753 enum nss_status status
= niserr2nss (res
->status
);
755 nis_freeresult (res
);
758 if ((parse_res
= _nss_nisplus_parse_grent (res
, 0, result
, buffer
,
759 buflen
, errnop
)) == -1)
761 nis_freeresult (res
);
763 return NSS_STATUS_TRYAGAIN
;
765 nis_freeresult (res
);
770 char *domain
, *outval
, *p
;
773 if (yp_get_default_domain (&domain
) != YPERR_SUCCESS
)
774 return NSS_STATUS_NOTFOUND
;
776 snprintf (buf
, sizeof (buf
), "%lu", (unsigned long int) gid
);
778 if (yp_match (domain
, "group.bygid", buf
, strlen (buf
),
779 &outval
, &outvallen
) != YPERR_SUCCESS
)
780 return NSS_STATUS_NOTFOUND
;
782 if (buflen
< ((size_t) outvallen
+ 1))
786 return NSS_STATUS_TRYAGAIN
;
789 /* Copy the found data to our buffer... */
790 p
= strncpy (buffer
, outval
, buflen
);
792 /* ... and free the data. */
797 parse_res
= _nss_files_parse_grent (p
, result
, data
, buflen
, errnop
);
799 return NSS_STATUS_TRYAGAIN
;
803 /* We found the entry. */
804 return NSS_STATUS_SUCCESS
;
806 return NSS_STATUS_RETURN
;
809 /* Searches in /etc/group and the NIS/NIS+ map for a special group id */
810 static enum nss_status
811 internal_getgrgid_r (gid_t gid
, struct group
*result
, ent_t
*ent
,
812 char *buffer
, size_t buflen
, int *errnop
)
814 struct parser_data
*data
= (void *) buffer
;
823 fgetpos (ent
->stream
, &pos
);
824 buffer
[buflen
- 1] = '\xff';
825 p
= fgets (buffer
, buflen
, ent
->stream
);
826 if (p
== NULL
&& feof (ent
->stream
))
827 return NSS_STATUS_NOTFOUND
;
829 if (p
== NULL
|| buffer
[buflen
- 1] != '\xff')
831 fsetpos (ent
->stream
, &pos
);
833 return NSS_STATUS_TRYAGAIN
;
836 /* Terminate the line for any case. */
837 buffer
[buflen
- 1] = '\0';
839 /* Skip leading blanks. */
843 while (*p
== '\0' || *p
== '#' || /* Ignore empty and comment lines. */
844 /* Parse the line. If it is invalid, loop to
845 get the next line of the file to parse. */
846 !(parse_res
= _nss_files_parse_grent (p
, result
, data
, buflen
,
851 /* The parser ran out of space. */
852 fsetpos (ent
->stream
, &pos
);
854 return NSS_STATUS_TRYAGAIN
;
857 /* This is a real entry. */
858 if (result
->gr_name
[0] != '+' && result
->gr_name
[0] != '-')
860 if (result
->gr_gid
== gid
)
861 return NSS_STATUS_SUCCESS
;
867 if (result
->gr_name
[0] == '-' && result
->gr_name
[1] != '\0')
869 blacklist_store_name (&result
->gr_name
[1], ent
);
874 if (result
->gr_name
[0] == '+' && result
->gr_name
[1] != '\0')
876 enum nss_status status
;
878 /* Store the group in the blacklist for the "+" at the end of
880 blacklist_store_name (&result
->gr_name
[1], ent
);
881 status
= getgrnam_plusgroup (&result
->gr_name
[1], result
, buffer
,
883 if (status
== NSS_STATUS_SUCCESS
&& result
->gr_gid
== gid
)
889 if (result
->gr_name
[0] == '+' && result
->gr_name
[1] == '\0')
891 enum nss_status status
;
893 status
= getgrgid_plusgroup (gid
, result
, buffer
, buflen
, errnop
);
894 if (status
== NSS_STATUS_RETURN
) /* We couldn't parse the entry */
895 return NSS_STATUS_NOTFOUND
;
901 return NSS_STATUS_SUCCESS
;
905 _nss_compat_getgrgid_r (gid_t gid
, struct group
*grp
,
906 char *buffer
, size_t buflen
, int *errnop
)
908 ent_t ent
= {0, 0, NULL
, 0, NULL
, NULL
, {NULL
, 0, 0}};
909 enum nss_status status
;
911 __libc_lock_lock (lock
);
913 status
= internal_setgrent (&ent
);
915 __libc_lock_unlock (lock
);
917 if (status
!= NSS_STATUS_SUCCESS
)
920 status
= internal_getgrgid_r (gid
, grp
, &ent
, buffer
, buflen
, errnop
);
922 internal_endgrent (&ent
);
928 /* Support routines for remembering -@netgroup and -user entries.
929 The names are stored in a single string with `|' as separator. */
931 blacklist_store_name (const char *name
, ent_t
*ent
)
933 int namelen
= strlen (name
);
936 /* first call, setup cache */
937 if (ent
->blacklist
.size
== 0)
939 ent
->blacklist
.size
= MAX (BLACKLIST_INITIAL_SIZE
, 2 * namelen
);
940 ent
->blacklist
.data
= malloc (ent
->blacklist
.size
);
941 if (ent
->blacklist
.data
== NULL
)
943 ent
->blacklist
.data
[0] = '|';
944 ent
->blacklist
.data
[1] = '\0';
945 ent
->blacklist
.current
= 1;
949 if (in_blacklist (name
, namelen
, ent
))
950 return; /* no duplicates */
952 if (ent
->blacklist
.current
+ namelen
+ 1 >= ent
->blacklist
.size
)
954 ent
->blacklist
.size
+= MAX (BLACKLIST_INCREMENT
, 2 * namelen
);
955 tmp
= realloc (ent
->blacklist
.data
, ent
->blacklist
.size
);
958 free (ent
->blacklist
.data
);
959 ent
->blacklist
.size
= 0;
962 ent
->blacklist
.data
= tmp
;
966 tmp
= stpcpy (ent
->blacklist
.data
+ ent
->blacklist
.current
, name
);
969 ent
->blacklist
.current
+= namelen
+ 1;
974 /* returns TRUE if ent->blacklist contains name, else FALSE */
976 in_blacklist (const char *name
, int namelen
, ent_t
*ent
)
978 char buf
[namelen
+ 3];
981 if (ent
->blacklist
.data
== NULL
)
985 cp
= stpcpy (&buf
[1], name
);
988 return strstr (ent
->blacklist
.data
, buf
) != NULL
;