SCCS-vsn: usr.sbin/sendmail/src/map.c 8.65
-static char sccsid[] = "@(#)map.c 8.64 (Berkeley) %G%";
+static char sccsid[] = "@(#)map.c 8.65 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"
# include <db.h>
#endif
#ifdef NIS
# include <db.h>
#endif
#ifdef NIS
- struct dom_binding { int dummy; }; /* needed on IRIX */
+ struct dom_binding; /* forward reference needed on IRIX */
# include <rpcsvc/ypclnt.h>
#endif
# include <rpcsvc/ypclnt.h>
#endif
inclnull = bitset(MF_INCLNULL, map->map_mflags);
map->map_mflags &= ~MF_INCLNULL;
inclnull = bitset(MF_INCLNULL, map->map_mflags);
map->map_mflags &= ~MF_INCLNULL;
- (void) sprintf(buf, "%010ld", curtime());
- ndbm_map_store(map, "YP_LAST_MODIFIED", buf);
+ if (strstr(map->map_file, "/yp/") != NULL)
+ {
+ (void) sprintf(buf, "%010ld", curtime());
+ ndbm_map_store(map, "YP_LAST_MODIFIED", buf);
- (void) gethostname(buf, sizeof buf);
- ndbm_map_store(map, "YP_MASTER_NAME", buf);
+ (void) gethostname(buf, sizeof buf);
+ ndbm_map_store(map, "YP_MASTER_NAME", buf);
+ }
if (inclnull)
map->map_mflags |= MF_INCLNULL;
if (inclnull)
map->map_mflags |= MF_INCLNULL;
if (hash_map_open(map, mode))
{
#if defined(NDBM) && defined(NIS)
if (hash_map_open(map, mode))
{
#if defined(NDBM) && defined(NIS)
- if (mode == O_RDONLY || access("/var/yp/Makefile", R_OK) != 0)
+ if (mode == O_RDONLY || strstr(map->map_file, "/yp/") == NULL)