Update to new upstream version 2.31

This commit is contained in:
Honza Horák 2013-05-06 18:52:37 +02:00
parent 718449681a
commit d0ea970d71
15 changed files with 89 additions and 686 deletions

View File

@ -1,7 +1,7 @@
diff -up ypserv-2.19/scripts/ypMakefile.in.nonedomain ypserv-2.19/scripts/ypMakefile.in
--- ypserv-2.19/scripts/ypMakefile.in.nonedomain 2008-09-25 13:11:50.000000000 +0200
+++ ypserv-2.19/scripts/ypMakefile.in 2008-09-25 13:11:50.000000000 +0200
@@ -98,10 +98,18 @@ NETMASKS = $(YPSRCDIR)/netmasks
diff -up ./scripts/ypMakefile.in.nonedomain ./scripts/ypMakefile.in
--- ./scripts/ypMakefile.in.nonedomain 2013-05-06 18:30:46.772434725 +0200
+++ ./scripts/ypMakefile.in 2013-05-06 18:31:59.429495323 +0200
@@ -106,10 +106,18 @@ NETMASKS = $(YPSRCDIR)/netmasks
YPSERVERS = $(YPDIR)/ypservers # List of all NIS servers for a domain
target: Makefile

View File

@ -1,7 +1,7 @@
diff -up ypserv-2.19/ypxfr/ypxfr.c.respzero ypserv-2.19/ypxfr/ypxfr.c
--- ypserv-2.19/ypxfr/ypxfr.c.respzero 2005-09-02 16:22:11.000000000 +0200
+++ ypserv-2.19/ypxfr/ypxfr.c 2008-09-25 13:10:39.000000000 +0200
@@ -364,6 +364,7 @@ ypxfr (char *map, char *source_host, cha
diff -up ./ypxfr/ypxfr.c.ypxfr-zeroresp ./ypxfr/ypxfr.c
--- ./ypxfr/ypxfr.c.ypxfr-zeroresp 2013-04-10 16:43:21.000000000 +0200
+++ ./ypxfr/ypxfr.c 2013-05-06 18:31:36.875476520 +0200
@@ -415,6 +415,7 @@ ypxfr (char *map, char *source_host, cha
struct hostent *h;
int sock, result;

View File

@ -1,7 +1,7 @@
diff -up ypserv-2.19/etc/ypserv.conf.slp-warning ypserv-2.19/etc/ypserv.conf
--- ypserv-2.19/etc/ypserv.conf.slp-warning 2004-04-01 12:06:38.000000000 +0200
+++ ypserv-2.19/etc/ypserv.conf 2008-09-25 13:12:59.000000000 +0200
@@ -17,9 +17,9 @@ dns: no
diff -up ./etc/ypserv.conf.slp-warning ./etc/ypserv.conf
--- ./etc/ypserv.conf.slp-warning 2006-10-12 13:03:32.000000000 +0200
+++ ./etc/ypserv.conf 2013-05-06 18:32:16.581509617 +0200
@@ -13,9 +13,9 @@
files: 30
# Should we register ypserv with SLP ?

View File

@ -1,6 +1,6 @@
diff -up ypserv-2.26/acinclude.m4.aliases ypserv-2.26/acinclude.m4
--- ypserv-2.26/acinclude.m4.aliases 2012-01-12 15:49:32.325205914 +0100
+++ ypserv-2.26/acinclude.m4 2012-01-12 15:50:07.570203506 +0100
diff -up ./acinclude.m4.aliases ./acinclude.m4
--- ./acinclude.m4.aliases 2005-04-07 14:38:44.000000000 +0200
+++ ./acinclude.m4 2013-05-06 18:32:54.423541141 +0200
@@ -92,3 +92,18 @@ AC_DEFUN([TYPE_SOCKLEN_T],
AC_DEFINE([socklen_t], [int], [Define if socklen_t is missing])
fi
@ -20,10 +20,10 @@ diff -up ypserv-2.26/acinclude.m4.aliases ypserv-2.26/acinclude.m4
+AC_MSG_RESULT($tmp_aliases)
+AC_SUBST(ALIASES, $tmp_aliases)
+])
diff -up ypserv-2.26/configure.in.aliases ypserv-2.26/configure.in
--- ypserv-2.26/configure.in.aliases 2012-01-12 15:48:52.068208666 +0100
+++ ypserv-2.26/configure.in 2012-01-12 15:49:17.842206905 +0100
@@ -149,7 +149,7 @@ fi
diff -up ./configure.in.aliases ./configure.in
--- ./configure.in.aliases 2013-04-11 11:26:22.000000000 +0200
+++ ./configure.in 2013-05-06 18:32:54.482541191 +0200
@@ -151,7 +151,7 @@ fi
AC_SUBST(MAKE)
dnl Check for aliases path

View File

@ -1,6 +1,6 @@
diff -up ypserv-2.24/rpc.yppasswdd/rpc.yppasswdd.8.manfix ypserv-2.24/rpc.yppasswdd/rpc.yppasswdd.8
--- ypserv-2.24/rpc.yppasswdd/rpc.yppasswdd.8.manfix 2007-09-26 14:37:10.000000000 +0200
+++ ypserv-2.24/rpc.yppasswdd/rpc.yppasswdd.8 2011-04-26 15:39:12.211115528 +0200
diff -up ./rpc.yppasswdd/rpc.yppasswdd.8.manfix ./rpc.yppasswdd/rpc.yppasswdd.8
--- ./rpc.yppasswdd/rpc.yppasswdd.8.manfix 2013-04-10 10:30:53.000000000 +0200
+++ ./rpc.yppasswdd/rpc.yppasswdd.8 2013-05-06 18:32:35.682525532 +0200
@@ -53,6 +53,15 @@ customized for that NIS domain\. If no s
\fBMakefile\fR
is found, the scripts uses the generic one in
@ -17,7 +17,7 @@ diff -up ypserv-2.24/rpc.yppasswdd/rpc.yppasswdd.8.manfix ypserv-2.24/rpc.yppass
.SH "OPTIONS"
.PP
The following options are available:
@@ -181,6 +190,8 @@ version\ 3\. Better still, look at
@@ -186,6 +195,8 @@ version\ 3\. Better still, look at
\fI/etc/passwd\fR
\fI/etc/shadow\fR
@ -26,9 +26,9 @@ diff -up ypserv-2.24/rpc.yppasswdd/rpc.yppasswdd.8.manfix ypserv-2.24/rpc.yppass
.SH "SEE ALSO"
.PP
diff -up ypserv-2.24/rpc.ypxfrd/rpc.ypxfrd.8.manfix ypserv-2.24/rpc.ypxfrd/rpc.ypxfrd.8
--- ypserv-2.24/rpc.ypxfrd/rpc.ypxfrd.8.manfix 2008-04-15 15:06:51.000000000 +0200
+++ ypserv-2.24/rpc.ypxfrd/rpc.ypxfrd.8 2011-04-26 15:42:21.310115598 +0200
diff -up ./rpc.ypxfrd/rpc.ypxfrd.8.manfix ./rpc.ypxfrd/rpc.ypxfrd.8
--- ./rpc.ypxfrd/rpc.ypxfrd.8.manfix 2013-04-10 10:30:53.000000000 +0200
+++ ./rpc.ypxfrd/rpc.ypxfrd.8 2013-05-06 18:32:35.693525541 +0200
@@ -47,6 +47,16 @@ could be started by inetd\. But since it
\fBypserv\fR
from
@ -46,7 +46,7 @@ diff -up ypserv-2.24/rpc.ypxfrd/rpc.ypxfrd.8.manfix ypserv-2.24/rpc.ypxfrd/rpc.y
.SH "OPTIONS"
.PP
\fB\-\-debug\fR
@@ -109,6 +119,12 @@ Configuration file for options and acces
@@ -114,6 +124,12 @@ Configuration file for options and acces
.RS 4
Configuration file for access rights
.RE
@ -59,9 +59,9 @@ diff -up ypserv-2.24/rpc.ypxfrd/rpc.ypxfrd.8.manfix ypserv-2.24/rpc.ypxfrd/rpc.y
.SH "SEE ALSO"
.PP
diff -up ypserv-2.24/ypserv/ypserv.8.manfix ypserv-2.24/ypserv/ypserv.8
--- ypserv-2.24/ypserv/ypserv.8.manfix 2010-01-27 13:07:08.000000000 +0100
+++ ypserv-2.24/ypserv/ypserv.8 2011-04-26 15:39:12.212115528 +0200
diff -up ./ypserv/ypserv.8.manfix ./ypserv/ypserv.8
--- ./ypserv/ypserv.8.manfix 2013-04-10 10:30:53.000000000 +0200
+++ ./ypserv/ypserv.8 2013-05-06 18:32:35.705525551 +0200
@@ -56,6 +56,14 @@ may or may not be running on the same no
\fBypserv\fR
parses the file
@ -76,8 +76,8 @@ diff -up ypserv-2.24/ypserv/ypserv.8.manfix ypserv-2.24/ypserv/ypserv.8
+\fB/etc/sysconfig/network\&.\fR
.SH "OPTIONS"
.PP
\fB\-d\fR, \fB\-\-debug \fR[\fIpath\fR]
@@ -148,6 +156,12 @@ configuration file\&.
\fB\-d\fR, \fB\-\-debug
@@ -149,6 +157,12 @@ configuration file\&.
which hosts are allowed to contact
\fBypserv\fR\&.
.RE

View File

@ -1,263 +0,0 @@
diff -up ypserv-2.25/rpc.yppasswdd/rpc.yppasswdd.8.systemd ypserv-2.25/rpc.yppasswdd/rpc.yppasswdd.8
--- ypserv-2.25/rpc.yppasswdd/rpc.yppasswdd.8.systemd 2011-05-10 14:11:56.272577424 +0200
+++ ypserv-2.25/rpc.yppasswdd/rpc.yppasswdd.8 2011-05-10 14:15:28.822920180 +0200
@@ -14,11 +14,11 @@
rpc.yppasswdd - NIS password update daemon
.SH "SYNOPSIS"
.HP 14
-\fBrpc\.yppasswdd\fR [\-D\ \fIdirectory\fR] \-e\ \fIchsh\fR|\fIchfn\fR [\-\-port\ \fInumber\fR]
+\fBrpc\.yppasswdd\fR [\-D\ \fIdirectory\fR] \-e\ \fIchsh\fR|\fIchfn\fR [\-\-port\ \fInumber\fR] [\-f|\-\-foreground]
.HP 14
-\fBrpc\.yppasswdd\fR [\-s\ \fIshadow\fR] [\-p\ \fIpasswd\fR] \-e\ \fIchsh\fR|\fIchfn\fR [\-\-port\ \fInumber\fR]
+\fBrpc\.yppasswdd\fR [\-s\ \fIshadow\fR] [\-p\ \fIpasswd\fR] \-e\ \fIchsh\fR|\fIchfn\fR [\-\-port\ \fInumber\fR] [\-f|\-\-foreground]
.HP 14
-\fBrpc\.yppasswdd\fR \-x\ \fIprogram\fR | \-E\ \fIprogram\fR \-e\ \fIchsh\fR|\fIchfn\fR [\-\-port\ \fInumber\fR]
+\fBrpc\.yppasswdd\fR \-x\ \fIprogram\fR | \-E\ \fIprogram\fR \-e\ \fIchsh\fR|\fIchfn\fR [\-\-port\ \fInumber\fR] [\-f|\-\-foreground]
.SH "DESCRIPTION"
.PP
@@ -135,6 +135,11 @@ rpc\.yppasswdd will try to register itse
.RS 4
Prints the version number and if this package is compiled with the CHECKROOT option\.
.RE
+.PP
+\fB\-f\fR, \fB\-\-foreground\fR
+.RS 4
+will not put itself into background\&.
+.RE
.SH "MISCELLANEOUS"
.SS "Shadow Passwords"
.PP
diff -up ypserv-2.25/rpc.yppasswdd/yppasswdd.c.systemd ypserv-2.25/rpc.yppasswdd/yppasswdd.c
--- ypserv-2.25/rpc.yppasswdd/yppasswdd.c.systemd 2011-05-10 14:11:56.258577599 +0200
+++ ypserv-2.25/rpc.yppasswdd/yppasswdd.c 2011-05-10 14:16:40.327026256 +0200
@@ -58,6 +58,8 @@ int allow_chfn = 0;
int solaris_mode = -1;
int x_flag = -1;
+static int foreground_flag = 0;
+
#define xprt_addr(xprt) (svc_getcaller(xprt)->sin_addr)
#define xprt_port(xprt) ntohs(svc_getcaller(xprt)->sin_port)
void yppasswdprog_1 (struct svc_req *rqstp, SVCXPRT * transp);
@@ -110,9 +112,9 @@ yppasswdprog_1 (struct svc_req *rqstp, S
static void
usage (FILE * fp, int n)
{
- fputs ("Usage: rpc.yppasswdd [--debug] [-s shadowfile] [-p passwdfile] [-e chsh|chfn]\n", fp);
- fputs (" rpc.yppasswdd [--debug] [-D directory] [-e chsh|chfn]\n", fp);
- fputs (" rpc.yppasswdd [--debug] [-x program |-E program] [-e chsh|chfn]\n", fp);
+ fputs ("Usage: rpc.yppasswdd [--debug] [-s shadowfile] [-p passwdfile] [-e chsh|chfn] [-f|--foreground]\n", fp);
+ fputs (" rpc.yppasswdd [--debug] [-D directory] [-e chsh|chfn] [-f|--foreground]\n", fp);
+ fputs (" rpc.yppasswdd [--debug] [-x program |-E program] [-e chsh|chfn] [-f|--foreground]\n", fp);
fputs (" rpc.yppasswdd --port number\n", fp);
fputs (" rpc.yppasswdd --version\n", fp);
exit (n);
@@ -200,12 +202,13 @@ main (int argc, char **argv)
{"usage", no_argument, NULL, 'h'},
{"help", no_argument, NULL, 'h'},
{"execute", required_argument, NULL, 'x'},
+ {"foreground", no_argument, NULL, 'f'},
{"debug", no_argument, NULL, '\254'},
{"port", required_argument, NULL, '\253'},
{NULL, 0, NULL, '\0'}
};
- c=getopt_long (argc, argv, "e:p:s:uhvD:E:x:m", long_options,
+ c=getopt_long (argc, argv, "e:p:s:fuhvD:E:x:m", long_options,
&option_index);
if (c == EOF)
break;
@@ -225,6 +228,9 @@ main (int argc, char **argv)
solaris_mode = 0;
path_passwd = optarg;
break;
+ case 'f':
+ foreground_flag = 1;
+ break;
case 's':
if (solaris_mode == 1)
usage (stderr, 1);
@@ -336,7 +342,7 @@ main (int argc, char **argv)
log_msg ("rpc.yppasswdd - NYS YP server version %s\n", VERSION);
#endif /* CHECKROOT */
}
- else
+ else if (!foreground_flag)
{
int i;
diff -up ypserv-2.25/rpc.ypxfrd/rpc.ypxfrd.8.systemd ypserv-2.25/rpc.ypxfrd/rpc.ypxfrd.8
--- ypserv-2.25/rpc.ypxfrd/rpc.ypxfrd.8.systemd 2011-05-10 14:11:56.286577250 +0200
+++ ypserv-2.25/rpc.ypxfrd/rpc.ypxfrd.8 2011-05-10 14:15:19.875032043 +0200
@@ -14,7 +14,7 @@
rpc.ypxfrd - NIS map transfer server
.SH "SYNOPSIS"
.HP 21
-\fB/usr/sbin/rpc\.ypxfrd\fR [\-d\ \fIpath\fR] [\-p\ \fIport\fR] [\-\-debug]
+\fB/usr/sbin/rpc\.ypxfrd\fR [\-d\ \fIpath\fR] [\-p\ \fIport\fR] [\-\-debug] [\-f|\-\-foreground]
.HP 21
\fB/usr/sbin/rpc\.ypxfrd\fR \-\-version
.SH "DESCRIPTION"
@@ -83,6 +83,11 @@ will bind itself to this port, which mak
.RS 4
Prints the version number
.RE
+.PP
+\fB\-f\fR, \fB\-\-foreground\fR
+.RS 4
+will not put itself into background\&.
+.RE
.SH "SECURITY"
.PP
diff -up ypserv-2.25/rpc.ypxfrd/ypxfrd.c.systemd ypserv-2.25/rpc.ypxfrd/ypxfrd.c
--- ypserv-2.25/rpc.ypxfrd/ypxfrd.c.systemd 2011-05-10 14:11:56.258577599 +0200
+++ ypserv-2.25/rpc.ypxfrd/ypxfrd.c 2011-05-10 14:16:26.193202954 +0200
@@ -79,6 +79,8 @@ char *path_ypdb = YPMAPDIR;
char *progname;
+static int foreground_flag = 0;
+
/*
** Needed, if we start rpc.ypxfrd from inetd
*/
@@ -140,7 +142,7 @@ sig_hup (int sig UNUSED)
static void
usage (int exitcode)
{
- fputs ("usage: rpc.ypxfrd [--debug] [-d path] [-p port]\n", stderr);
+ fputs ("usage: rpc.ypxfrd [--debug] [-d path] [-p port] [-f|--foreground]\n", stderr);
fputs (" rpc.ypxfrd --version\n", stderr);
exit (exitcode);
@@ -180,12 +182,13 @@ main (int argc, char **argv)
{"port", required_argument, NULL, 'p'},
{"path", required_argument, NULL, 'd'},
{"dir", required_argument, NULL, 'd'},
+ {"foreground", no_argument, NULL, 'f'},
{"usage", no_argument, NULL, 'u'},
{"help", no_argument, NULL, 'h'},
{NULL, 0, NULL, '\0'}
};
- c=getopt_long(argc, argv, "p:d:uh",long_options, &option_index);
+ c=getopt_long(argc, argv, "p:d:fuh",long_options, &option_index);
if (c==EOF) break;
switch (c)
{
@@ -212,6 +215,9 @@ main (int argc, char **argv)
if (debug_flag)
log_msg("Using port %d\n", my_port);
break;
+ case 'f':
+ foreground_flag = 1;
+ break;
case 'u':
case 'h':
usage(0);
@@ -227,8 +233,8 @@ main (int argc, char **argv)
if (debug_flag)
log_msg("[Welcome to the rpc.ypxfrd Daemon, version %s]\n", VERSION);
- else
- if(!_rpcpmstart)
+ else
+ if (!_rpcpmstart && !foreground_flag)
{
int i;
diff -up ypserv-2.25/ypserv/ypserv.8.systemd ypserv-2.25/ypserv/ypserv.8
--- ypserv-2.25/ypserv/ypserv.8.systemd 2011-05-10 14:11:56.295577137 +0200
+++ ypserv-2.25/ypserv/ypserv.8 2011-05-10 14:15:01.646259934 +0200
@@ -22,7 +22,7 @@
ypserv \- NIS Server
.SH "SYNOPSIS"
.HP \w'\fB/usr/sbin/ypserv\fR\ 'u
-\fB/usr/sbin/ypserv\fR [\-d\ [\fIpath\fR]] [\-p\ \fIport\fR]
+\fB/usr/sbin/ypserv\fR [\-d\] [\-p\ \fIport\fR] [\-f|\-\-foreground]
.SH "DESCRIPTION"
.PP
.\" ypserv: ypserv \(em NIS server process
@@ -66,15 +66,11 @@ and this variable can be set in
\fB/etc/sysconfig/network\&.\fR
.SH "OPTIONS"
.PP
-\fB\-d\fR, \fB\-\-debug \fR[\fIpath\fR]
+\fB\-d\fR, \fB\-\-debug
.RS 4
Causes the server to run in debugging mode\&. Normally,
\fBypserv\fR
reports only errors (access violations, dbm failures) using the syslog(3) facility\&. In debug mode, the server does not background itself and prints extra status messages to stderr for each request that it revceives\&.
-\fBpath\fR
-is an optionally parameter\&.
-\fBypserv\fR
-is using this directory instead of /var/yp
.RE
.PP
\fB\-p\fR, \fB\-\-port\fR \fIport\fR
@@ -87,6 +83,11 @@ will bind itself to this port\&. This ma
.RS 4
Prints the version number
.RE
+.PP
+\fB\-f\fR, \fB\-\-foreground\fR
+.RS 4
+will not put itself into background\&.
+.RE
.SH "SECURITY"
.PP
In general, any remote user can issue an RPC to
diff -up ypserv-2.25/ypserv/ypserv.c.systemd ypserv-2.25/ypserv/ypserv.c
--- ypserv-2.25/ypserv/ypserv.c.systemd 2011-05-10 14:11:56.261577563 +0200
+++ ypserv-2.25/ypserv/ypserv.c 2011-05-10 14:16:19.745283563 +0200
@@ -60,6 +60,7 @@
#endif
static char *path_ypdb = YPMAPDIR;
+static int foreground_flag = 0;
static void
ypprog_2 (struct svc_req *rqstp, register SVCXPRT * transp)
@@ -317,7 +318,7 @@ sig_child (int sig UNUSED)
static void
Usage (int exitcode)
{
- fputs ("usage: ypserv [-d [path]] [-p port]\n", stderr);
+ fputs ("usage: ypserv [-d] [-p port] [-f|--foreground]\n", stderr);
fputs (" ypserv --version\n", stderr);
exit (exitcode);
@@ -342,10 +343,11 @@ main (int argc, char **argv)
{"port", required_argument, NULL, 'p'},
{"usage", no_argument, NULL, 'u'},
{"help", no_argument, NULL, 'h'},
+ {"foreground", no_argument, NULL, 'f'},
{NULL, 0, NULL, '\0'}
};
- c = getopt_long (argc, argv, "vdp:buh", long_options, &option_index);
+ c = getopt_long (argc, argv, "vdp:fbuh", long_options, &option_index);
if (c == -1)
break;
switch (c)
@@ -368,6 +370,9 @@ main (int argc, char **argv)
if (debug_flag)
log_msg ("Using port %d\n", my_port);
break;
+ case 'f':
+ foreground_flag = 1;
+ break;
case 'u':
case 'h':
Usage (0);
@@ -383,7 +388,7 @@ main (int argc, char **argv)
if (debug_flag)
log_msg ("[ypserv (%s) %s]\n", PACKAGE, VERSION);
- else
+ else if (! foreground_flag)
{
int i;

View File

@ -1,12 +0,0 @@
diff -up ypserv-2.26/lib/pidfile.c.cloexec ypserv-2.26/lib/pidfile.c
--- ypserv-2.26/lib/pidfile.c.cloexec 2011-04-15 16:49:41.000000000 +0200
+++ ypserv-2.26/lib/pidfile.c 2012-04-13 20:49:55.643903727 +0200
@@ -33,7 +33,7 @@ create_pidfile (const char *filename, co
char pbuf[50], *ptr;
struct flock lock;
- fd = open (filename, O_CREAT | O_RDWR,
+ fd = open (filename, O_CREAT | O_RDWR | O_CLOEXEC,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if (fd < 0)
{

View File

@ -1,7 +1,10 @@
diff -up ypserv-2.27/conf_post.h.qdbm ypserv-2.27/conf_post.h
--- ypserv-2.27/conf_post.h.qdbm 2012-02-01 14:18:01.780846425 +0100
+++ ypserv-2.27/conf_post.h 2012-02-01 14:18:01.780846425 +0100
@@ -0,0 +1,10 @@
diff -up ./conf_post.h.confpost ./conf_post.h
--- ./conf_post.h.confpost 2012-04-17 15:47:28.000000000 +0200
+++ ./conf_post.h 2013-05-06 18:34:54.274640856 +0200
@@ -8,3 +8,13 @@
#define HAVE_COMPAT_LIBGDBM
#endif
+/* Define common preprocessor symbol for HAVE_LIBGDBM and HAVE_LIBQDBM, since
+ * libraries gdbm and qdbm have same symbol names. */
+#undef HAVE_COMPAT_LIBGDBM

View File

@ -1,138 +0,0 @@
diff -up ypserv-2.29/lib/yp_db.c.dbopen ypserv-2.29/lib/yp_db.c
--- ypserv-2.29/lib/yp_db.c.dbopen 2012-05-30 13:28:49.000000000 +0200
+++ ypserv-2.29/lib/yp_db.c 2013-01-28 12:07:28.555350199 +0100
@@ -173,11 +173,14 @@ _db_open (const char *domain, const char
sprintf (buf, "%s/%s", domain, map);
dbp = tcbdbnew ();
- isok = tcbdbopen (dbp, buf, BDBOREADER);
+ isok = tcbdbopen (dbp, buf, BDBOREADER | BDBONOLCK);
if (debug_flag && !isok)
- log_msg ("tcbdbopen: Tokyo Cabinet Error: %s",
- tcbdberrmsg (tcbdbecode (dbp)));
+ {
+ log_msg ("tcbdbopen: Tokyo Cabinet Error: %s",
+ tcbdberrmsg (tcbdbecode (dbp)));
+ log_msg ("tcbdbopen: consider rebuilding maps using ypinit");
+ }
else if (debug_flag)
log_msg ("\t\t->Returning OK!");
}
diff -up ypserv-2.29/makedbm/makedbm.c.dbopen ypserv-2.29/makedbm/makedbm.c
--- ypserv-2.29/makedbm/makedbm.c.dbopen 2012-05-30 13:28:49.000000000 +0200
+++ ypserv-2.29/makedbm/makedbm.c 2013-01-28 12:23:50.243283071 +0100
@@ -490,6 +490,9 @@ create_file (char *fileName, char *dbmNa
#endif
#else
unlink (dbmName);
+#if defined(HAVE_LIBTC)
+ chmod(filename, S_IRUSR|S_IWUSR);
+#endif
rename (filename, dbmName);
#endif
free (filename);
@@ -508,7 +511,7 @@ dump_file (char *dbmName)
dbm = dbm_open (dbmName, O_RDONLY, 0600);
#elif defined(HAVE_LIBTC)
dbm = tcbdbnew();
- if (!tcbdbopen (dbm, dbmName, BDBOREADER))
+ if (!tcbdbopen (dbm, dbmName, BDBOREADER | BDBONOLCK))
{
tcbdbdel(dbm);
dbm = NULL;
@@ -517,6 +520,7 @@ dump_file (char *dbmName)
if (dbm == NULL)
{
fprintf (stderr, "makedbm: Cannot open %s\n", dbmName);
+ fprintf (stderr, "makedbm: Consider rebuilding maps using ypinit\n");
exit (1);
}
#if defined(HAVE_COMPAT_LIBGDBM)
diff -up ypserv-2.29/yphelper/yphelper.c.dbopen ypserv-2.29/yphelper/yphelper.c
--- ypserv-2.29/yphelper/yphelper.c.dbopen 2012-05-30 13:28:50.000000000 +0200
+++ ypserv-2.29/yphelper/yphelper.c 2013-01-28 12:24:14.378281420 +0100
@@ -507,10 +507,10 @@ get_dbm_entry (char *key, char *map, cha
#if defined(HAVE_COMPAT_LIBGDBM)
dbm = gdbm_open (mappath, 0, GDBM_READER, 0600, NULL);
#elif defined(HAVE_NDBM)
- dbm = dbm_open (mappath, O_CREAT | O_RDWR, 0600);
+ dbm = dbm_open (mappath, O_RDONLY, 0600);
#elif defined(HAVE_LIBTC)
dbm = tcbdbnew();
- if (!tcbdbopen(dbm, mappath, BDBOWRITER | BDBOCREAT))
+ if (!tcbdbopen(dbm, mappath, BDBOREADER | BDBONOLCK))
{
tcbdbdel(dbm);
dbm = NULL;
@@ -519,6 +519,7 @@ get_dbm_entry (char *key, char *map, cha
if (dbm == NULL)
{
fprintf (stderr, "yphelper: cannot open %s\n", mappath);
+ fprintf (stderr, "yphelper: consider rebuilding maps using ypinit\n", mappath);
exit (1);
}
diff -up ypserv-2.29/yppush/yppush.c.dbopen ypserv-2.29/yppush/yppush.c
--- ypserv-2.29/yppush/yppush.c.dbopen 2012-08-30 09:53:16.000000000 +0200
+++ ypserv-2.29/yppush/yppush.c 2013-01-28 12:23:59.161282461 +0100
@@ -290,10 +290,10 @@ get_dbm_entry (char *key)
#if defined(HAVE_COMPAT_LIBGDBM)
dbm = gdbm_open (mappath, 0, GDBM_READER, 0600, NULL);
#elif defined(HAVE_NDBM)
- dbm = dbm_open (mappath, O_CREAT | O_RDWR, 0600);
+ dbm = dbm_open (mappath, O_RDONLY, 0600);
#elif defined(HAVE_LIBTC)
dbm = tcbdbnew();
- if (!tcbdbopen(dbm, mappath, BDBOWRITER | BDBOCREAT))
+ if (!tcbdbopen(dbm, mappath, BDBOREADER | BDBONOLCK))
{
tcbdbdel(dbm);
dbm = NULL;
@@ -302,6 +302,7 @@ get_dbm_entry (char *key)
if (dbm == NULL)
{
log_msg ("YPPUSH: Cannot open %s", mappath);
+ log_msg ("YPPUSH: consider rebuilding maps using ypinit");
exit (1);
}
diff -up ypserv-2.29/ypxfr/ypxfr.c.dbopen ypserv-2.29/ypxfr/ypxfr.c
--- ypserv-2.29/ypxfr/ypxfr.c.dbopen 2013-01-28 12:07:28.475350204 +0100
+++ ypserv-2.29/ypxfr/ypxfr.c 2013-01-28 12:24:07.195281912 +0100
@@ -557,10 +557,10 @@ ypxfr (char *map, char *source_host, cha
#if defined(HAVE_COMPAT_LIBGDBM)
dbm = gdbm_open (dbName_orig, 0, GDBM_READER, 0600, NULL);
#elif defined(HAVE_NDBM)
- dbm = dbm_open (dbName_orig, O_CREAT|O_RDWR, 0600);
+ dbm = dbm_open (dbName_orig, O_RDONLY, 0600);
#elif defined(HAVE_LIBTC)
dbm = tcbdbnew ();
- if (!tcbdbopen (dbm, dbName_orig, BDBOWRITER | BDBOCREAT))
+ if (!tcbdbopen (dbm, dbName_orig, BDBOREADER | BDBONOLCK))
{
tcbdbdel (dbm);
dbm = NULL;
@@ -629,7 +629,7 @@ ypxfr (char *map, char *source_host, cha
dbm = dbm_open (dbName_temp, O_CREAT|O_RDWR, 0600);
#elif defined(HAVE_LIBTC)
dbm = tcbdbnew ();
- if (!tcbdbopen (dbm, dbName_orig, BDBOWRITER | BDBOCREAT))
+ if (!tcbdbopen (dbm, dbName_orig, BDBOWRITER | BDBOCREAT | BDBOTRUNC))
{
tcbdbdel (dbm);
dbm = NULL;
@@ -782,7 +782,12 @@ ypxfr (char *map, char *source_host, cha
}
if (result == 0)
- rename (dbName_temp, dbName_orig);
+ {
+#if defined(HAVE_LIBTC)
+ chmod(dbName_temp, S_IRUSR|S_IWUSR);
+#endif
+ rename (dbName_temp, dbName_orig);
+ }
else
unlink(dbName_temp);

View File

@ -1,11 +0,0 @@
diff -up ypserv-2.29/ypserv/server.c.nomap2 ypserv-2.29/ypserv/server.c
--- ypserv-2.29/ypserv/server.c.nomap2 2012-11-09 10:43:21.953487135 +0100
+++ ypserv-2.29/ypserv/server.c 2012-11-09 10:59:32.472973005 +0100
@@ -835,6 +835,7 @@ ypproc_all_2_svc (ypreq_nokey *argp, ypr
if (debug_flag)
log_msg ("\t-> Ignored (not a valid domain)");
result->ypresp_all_u.val.stat = YP_NODOM;
+ break;
case -4:
if (debug_flag)
log_msg ("\t-> Ignored (map does not exist)");

View File

@ -1,18 +1,18 @@
diff -up ypserv-2.29/rpc.yppasswdd/Makefile.am.relro ypserv-2.29/rpc.yppasswdd/Makefile.am
--- ypserv-2.29/rpc.yppasswdd/Makefile.am.relro 2012-11-30 09:15:26.506840750 +0100
+++ ypserv-2.29/rpc.yppasswdd/Makefile.am 2012-11-30 09:17:16.645876112 +0100
diff -up ./rpc.yppasswdd/Makefile.am.relro ./rpc.yppasswdd/Makefile.am
--- ./rpc.yppasswdd/Makefile.am.relro 2013-04-11 11:25:34.000000000 +0200
+++ ./rpc.yppasswdd/Makefile.am 2013-05-06 18:48:10.888711995 +0200
@@ -24,6 +24,8 @@ sbin_PROGRAMS = rpc.yppasswdd
rpc_yppasswdd_SOURCES = update.c yppasswd_xdr.c yppasswdd.c
+rpc_yppasswdd_LDFLAGS = -Wl,-z,relro,-z,now
+rpc_yppasswdd_LDFLAGS = -Wl,-z,relro,-z,now
+
rpc_yppasswdd_LDADD = @PIE_LDFLAGS@ $(LIBDBM) $(LIBCRYPT) $(LIBSYSTEMD_DAEMON) $(top_builddir)/lib/libyp.a
rpc_yppasswdd_LDADD = @PIE_LDFLAGS@ $(top_builddir)/lib/libyp.a $(LIBDBM) $(LIBCRYPT) $(LIBSYSTEMD_DAEMON)
rpc_yppasswdd_CFLAGS = @PIE_CFLAGS@
diff -up ypserv-2.29/rpc.ypxfrd/Makefile.am.relro ypserv-2.29/rpc.ypxfrd/Makefile.am
--- ypserv-2.29/rpc.ypxfrd/Makefile.am.relro 2012-11-30 09:15:26.507840751 +0100
+++ ypserv-2.29/rpc.ypxfrd/Makefile.am 2012-11-30 09:17:58.244888505 +0100
diff -up ./rpc.ypxfrd/Makefile.am.relro ./rpc.ypxfrd/Makefile.am
--- ./rpc.ypxfrd/Makefile.am.relro 2013-04-09 16:38:20.000000000 +0200
+++ ./rpc.ypxfrd/Makefile.am 2013-05-06 18:46:36.455683217 +0200
@@ -22,6 +22,8 @@ sbin_PROGRAMS = rpc.ypxfrd
rpc_ypxfrd_SOURCES = ypxfrd.c ypxfrd_server.c ypxfrd_svc.c
@ -22,9 +22,9 @@ diff -up ypserv-2.29/rpc.ypxfrd/Makefile.am.relro ypserv-2.29/rpc.ypxfrd/Makefil
rpc_ypxfrd_LDADD = @PIE_LDFLAGS@ $(top_builddir)/lib/libyp.a @LIBDBM@ $(LIBSYSTEMD_DAEMON)
rpc_ypxfrd_CFLAGS = @PIE_CFLAGS@
diff -up ypserv-2.29/yppush/Makefile.am.relro ypserv-2.29/yppush/Makefile.am
--- ypserv-2.29/yppush/Makefile.am.relro 2009-04-02 14:15:35.000000000 +0200
+++ ypserv-2.29/yppush/Makefile.am 2012-11-30 09:18:39.422900251 +0100
diff -up ./yppush/Makefile.am.relro ./yppush/Makefile.am
--- ./yppush/Makefile.am.relro 2009-04-02 14:15:35.000000000 +0200
+++ ./yppush/Makefile.am 2013-05-06 18:46:36.456683217 +0200
@@ -21,6 +21,8 @@ sbin_PROGRAMS = yppush
yppush_SOURCES = yppush.c
@ -34,9 +34,9 @@ diff -up ypserv-2.29/yppush/Makefile.am.relro ypserv-2.29/yppush/Makefile.am
yppush_LDADD = @PIE_LDFLAGS@ @LIBDBM@ $(top_builddir)/lib/libyp.a
yppush_CFLAGS = @PIE_CFLAGS@
diff -up ypserv-2.29/ypserv/Makefile.am.relro ypserv-2.29/ypserv/Makefile.am
--- ypserv-2.29/ypserv/Makefile.am.relro 2012-11-30 09:15:26.508840752 +0100
+++ ypserv-2.29/ypserv/Makefile.am 2012-11-30 09:18:52.133903983 +0100
diff -up ./ypserv/Makefile.am.relro ./ypserv/Makefile.am
--- ./ypserv/Makefile.am.relro 2013-04-09 16:38:20.000000000 +0200
+++ ./ypserv/Makefile.am 2013-05-06 18:46:36.457683217 +0200
@@ -22,6 +22,8 @@ sbin_PROGRAMS = ypserv
ypserv_SOURCES = ypserv.c server.c ypserv_xdr.c reg_slp.c

View File

@ -1,171 +0,0 @@
diff -up ypserv-2.28/configure.in.sdnotify ypserv-2.28/configure.in
--- ypserv-2.28/configure.in.sdnotify 2012-07-12 14:29:03.491853939 +0200
+++ ypserv-2.28/configure.in 2012-07-12 14:29:03.505854057 +0200
@@ -269,6 +269,19 @@ if test "$ac_cv_func_getrpcport" = no; t
[ac_cv_func_getrpcport=yes; LIBS="-lrpcsvc $LIBS"])
fi
+USE_SD_NOTIFY=0
+AC_SUBST(USE_SD_NOTIFY)
+AC_CHECK_LIB(systemd-daemon,sd_notify,LIBSYSTEMD_DAEMON="-lsystemd-daemon",
+ LIBSYSTEMD_DAEMON="")
+if test -n "$LIBSYSTEMD_DAEMON" ; then
+ AC_CHECK_HEADERS(systemd/sd-daemon.h)
+ if test "$ac_cv_header_systemd_sd_notify_h" = yes; then
+ USE_SD_NOTIFY=1
+ fi
+fi
+AC_SUBST(USE_SD_NOTIFY)
+AC_SUBST(LIBSYSTEMD_DAEMON)
+
AC_CHECK_LIB(nsl,gethostbyname)
AC_CHECK_LIB(socket,socket)
AC_CHECK_LIB(resolv, res_gethostbyname, RESOLV="-lresolv", RESOLV="")
@@ -357,7 +370,7 @@ Configuration:
Compiler flags: ${CFLAGS}
Preprocessor: ${CPP}
Preprocessor flags: ${CPPFLAGS}
- Libraries: ${LIBS} ${LIBDBM} ${LIBCRYPT}
+ Libraries: ${LIBS} ${LIBDBM} ${LIBCRYPT} ${LIBSYSTEMD_DAEMON}
Awk: ${AWK}
Shell: ${BASH}
NIS map dir: ${YPMAPDIR}
diff -up ypserv-2.28/lib/access.c.sdnotify ypserv-2.28/lib/access.c
--- ypserv-2.28/lib/access.c.sdnotify 2011-08-31 13:40:11.000000000 +0200
+++ ypserv-2.28/lib/access.c 2012-07-12 14:29:03.505854057 +0200
@@ -30,6 +30,9 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#if defined(HAVE_SYSTEMD_SD_DAEMON_H)
+#include <systemd/sd-daemon.h>
+#endif
#include "log_msg.h"
#include "ypserv_conf.h"
@@ -215,3 +218,25 @@ is_valid (struct svc_req *rqstp, const c
return status;
}
+
+/* Send a messages to systemd daemon, that inicialization of daemon
+ is finished and daemon is ready to accept connections.
+ It is a nop if we don't use systemd. */
+void
+announce_ready()
+{
+#ifdef USE_SD_NOTIFY
+ int result;
+
+ result = sd_notifyf(0, "READY=1\n"
+ "STATUS=Processing requests...\n"
+ "MAINPID=%lu", (unsigned long) getpid());
+
+ /* Return code from sd_notifyf can be ignored, as per sd_notifyf(3).
+ However, if we use systemd's native unit file, we need to send
+ this message to let systemd know that daemon is ready.
+ Thus, we want to know that the call had some issues. */
+ if (result < 0)
+ log_msg ("sd_notifyf failed: %s\n", strerror(-result));
+#endif
+}
diff -up ypserv-2.28/lib/Makefile.am.sdnotify ypserv-2.28/lib/Makefile.am
--- ypserv-2.28/lib/Makefile.am.sdnotify 2010-02-23 14:44:55.000000000 +0100
+++ ypserv-2.28/lib/Makefile.am 2012-07-12 14:29:03.506854065 +0200
@@ -13,7 +13,8 @@ noinst_HEADERS = log_msg.h yp.h ypserv_c
rpcsvc_HEADERS = ypxfrd.x
-DEFS = @DEFS@ -D_REENTRANT=1 -DCONFDIR=\"$(sysconfdir)\" -DUSE_SLP=@USE_SLP@
+DEFS = @DEFS@ -D_REENTRANT=1 -DCONFDIR=\"$(sysconfdir)\" -DUSE_SLP=@USE_SLP@ \
+ -DUSE_SD_NOTIFY=@USE_SD_NOTIFY@
INCLUDES = -I$(top_srcdir) -I$(top_builddir) -I$(srcdir)
AM_CFLAGS = @PIE_CFLAGS@
diff -up ypserv-2.28/rpc.yppasswdd/Makefile.am.sdnotify ypserv-2.28/rpc.yppasswdd/Makefile.am
--- ypserv-2.28/rpc.yppasswdd/Makefile.am.sdnotify 2006-08-02 15:05:04.000000000 +0200
+++ ypserv-2.28/rpc.yppasswdd/Makefile.am 2012-07-12 14:29:03.506854065 +0200
@@ -24,7 +24,7 @@ sbin_PROGRAMS = rpc.yppasswdd
rpc_yppasswdd_SOURCES = update.c yppasswd_xdr.c yppasswdd.c
-rpc_yppasswdd_LDADD = @PIE_LDFLAGS@ $(LIBDBM) $(LIBCRYPT) $(top_builddir)/lib/libyp.a
+rpc_yppasswdd_LDADD = @PIE_LDFLAGS@ $(LIBDBM) $(LIBCRYPT) $(LIBSYSTEMD_DAEMON) $(top_builddir)/lib/libyp.a
rpc_yppasswdd_CFLAGS = @PIE_CFLAGS@
if ENABLE_REGENERATE_MAN
diff -up ypserv-2.28/rpc.yppasswdd/yppasswdd.c.sdnotify ypserv-2.28/rpc.yppasswdd/yppasswdd.c
--- ypserv-2.28/rpc.yppasswdd/yppasswdd.c.sdnotify 2012-07-12 14:29:03.494853964 +0200
+++ ypserv-2.28/rpc.yppasswdd/yppasswdd.c 2012-07-12 14:29:03.507854073 +0200
@@ -457,6 +457,13 @@ main (int argc, char **argv)
exit (1);
}
+ /* If we use systemd as an init system, we may want to give it
+ a message, that this daemon is ready to accept connections.
+ At this time, sockets for receiving connections are already
+ created, so we can say we're ready now. It is a nop if we
+ don't use systemd. */
+ announce_ready();
+
/* Run the server */
svc_run ();
log_msg ("svc_run returned\n");
diff -up ypserv-2.28/rpc.ypxfrd/Makefile.am.sdnotify ypserv-2.28/rpc.ypxfrd/Makefile.am
--- ypserv-2.28/rpc.ypxfrd/Makefile.am.sdnotify 2012-07-12 14:29:42.795191749 +0200
+++ ypserv-2.28/rpc.ypxfrd/Makefile.am 2012-07-12 14:30:04.450388983 +0200
@@ -22,7 +22,7 @@ sbin_PROGRAMS = rpc.ypxfrd
rpc_ypxfrd_SOURCES = ypxfrd.c ypxfrd_server.c ypxfrd_svc.c
-rpc_ypxfrd_LDADD = @PIE_LDFLAGS@ $(top_builddir)/lib/libyp.a @LIBDBM@
+rpc_ypxfrd_LDADD = @PIE_LDFLAGS@ $(top_builddir)/lib/libyp.a @LIBDBM@ $(LIBSYSTEMD_DAEMON)
rpc_ypxfrd_CFLAGS = @PIE_CFLAGS@
if ENABLE_REGENERATE_MAN
diff -up ypserv-2.28/rpc.ypxfrd/ypxfrd.c.sdnotify ypserv-2.28/rpc.ypxfrd/ypxfrd.c
--- ypserv-2.28/rpc.ypxfrd/ypxfrd.c.sdnotify 2012-07-12 14:29:03.496853980 +0200
+++ ypserv-2.28/rpc.ypxfrd/ypxfrd.c 2012-07-12 14:29:03.508854082 +0200
@@ -458,6 +458,13 @@ main (int argc, char **argv)
alarm (_RPCSVC_CLOSEDOWN);
}
+ /* If we use systemd as an init system, we may want to give it
+ a message, that this daemon is ready to accept connections.
+ At this time, sockets for receiving connections are already
+ created, so we can say we're ready now. It is a nop if we
+ don't use systemd. */
+ announce_ready();
+
svc_run();
log_msg("svc_run returned");
unlink (_YPXFRD_PIDFILE);
diff -up ypserv-2.28/ypserv/Makefile.am.sdnotify ypserv-2.28/ypserv/Makefile.am
--- ypserv-2.28/ypserv/Makefile.am.sdnotify 2009-04-02 15:10:19.000000000 +0200
+++ ypserv-2.28/ypserv/Makefile.am 2012-07-12 14:30:15.628494608 +0200
@@ -22,7 +22,7 @@ sbin_PROGRAMS = ypserv
ypserv_SOURCES = ypserv.c server.c ypserv_xdr.c reg_slp.c
-ypserv_LDADD = @PIE_LDFLAGS@ $(top_builddir)/lib/libyp.a @LIBDBM@ @LIBSLP@
+ypserv_LDADD = @PIE_LDFLAGS@ $(top_builddir)/lib/libyp.a @LIBDBM@ @LIBSLP@ $(LIBSYSTEMD_DAEMON)
ypserv_CFLAGS = @PIE_CFLAGS@
if ENABLE_REGENERATE_MAN
diff -up ypserv-2.28/ypserv/ypserv.c.sdnotify ypserv-2.28/ypserv/ypserv.c
--- ypserv-2.28/ypserv/ypserv.c.sdnotify 2012-07-12 14:29:03.498853997 +0200
+++ ypserv-2.28/ypserv/ypserv.c 2012-07-12 14:29:03.509854091 +0200
@@ -586,6 +586,13 @@ main (int argc, char **argv)
register_slp ();
#endif
+ /* If we use systemd as an init system, we may want to give it
+ a message, that this daemon is ready to accept connections.
+ At this time, sockets for receiving connections are already
+ created, so we can say we're ready now. It is a nop if we
+ don't use systemd. */
+ announce_ready();
+
#if 0
mysvc_run ();
#else

View File

@ -1,7 +1,7 @@
diff -up ypserv-2.19/scripts/ypMakefile.in.nfsnobody ypserv-2.19/scripts/ypMakefile.in
--- ypserv-2.19/scripts/ypMakefile.in.nfsnobody 2008-09-25 13:08:19.000000000 +0200
+++ ypserv-2.19/scripts/ypMakefile.in 2008-09-25 13:08:19.000000000 +0200
@@ -32,6 +32,11 @@ NOPUSH=true
diff -up ./scripts/ypMakefile.in.nfsnobody2 ./scripts/ypMakefile.in
--- ./scripts/ypMakefile.in.nfsnobody2 2013-05-06 18:28:38.558327612 +0200
+++ ./scripts/ypMakefile.in 2013-05-06 18:30:46.772434725 +0200
@@ -40,6 +40,11 @@ YPPUSH_ARGS =
MINUID=500
MINGID=500
@ -13,7 +13,7 @@ diff -up ypserv-2.19/scripts/ypMakefile.in.nfsnobody ypserv-2.19/scripts/ypMakef
# Should we merge the passwd file with the shadow file ?
# MERGE_PASSWD=true|false
MERGE_PASSWD=true
@@ -286,7 +291,7 @@ passwd.byname: $(PASSWD) $(SHADOW) $(YPD
@@ -294,7 +299,7 @@ passwd.byname: $(PASSWD) $(SHADOW) $(YPD
@echo "Updating $@..."
@$(UMASK); \
$(MERGER) -p $(PASSWD) $(SHADOW) | \
@ -22,7 +22,7 @@ diff -up ypserv-2.19/scripts/ypMakefile.in.nfsnobody ypserv-2.19/scripts/ypMakef
print $$1"\t"$$0 }' | $(DBLOAD) -i $(PASSWD) \
-o $(YPMAPDIR)/$@ - $@
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
@@ -295,7 +300,7 @@ passwd.byuid: $(PASSWD) $(SHADOW) $(YPDI
@@ -303,7 +308,7 @@ passwd.byuid: $(PASSWD) $(SHADOW) $(YPDI
@echo "Updating $@..."
@$(UMASK); \
$(MERGER) -p $(PASSWD) $(SHADOW) | \
@ -31,7 +31,7 @@ diff -up ypserv-2.19/scripts/ypMakefile.in.nfsnobody ypserv-2.19/scripts/ypMakef
print $$3"\t"$$0 }' | $(DBLOAD) -i $(PASSWD) \
-o $(YPMAPDIR)/$@ - $@
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
@@ -309,7 +314,7 @@ else
@@ -317,7 +322,7 @@ else
passwd.byname: $(PASSWD) $(YPDIR)/Makefile
@echo "Updating $@..."
@$(UMASK); \
@ -40,7 +40,7 @@ diff -up ypserv-2.19/scripts/ypMakefile.in.nfsnobody ypserv-2.19/scripts/ypMakef
print $$1"\t"$$0 }' $(PASSWD) | $(DBLOAD) -i $(PASSWD) \
-o $(YPMAPDIR)/$@ - $@
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
@@ -317,7 +322,7 @@ passwd.byname: $(PASSWD) $(YPDIR)/Makefi
@@ -325,7 +330,7 @@ passwd.byname: $(PASSWD) $(YPDIR)/Makefi
passwd.byuid: $(PASSWD) $(YPDIR)/Makefile
@echo "Updating $@..."
@$(UMASK); \
@ -49,7 +49,7 @@ diff -up ypserv-2.19/scripts/ypMakefile.in.nfsnobody ypserv-2.19/scripts/ypMakef
print $$3"\t"$$0 }' $(PASSWD) | $(DBLOAD) -i $(PASSWD) \
-o $(YPMAPDIR)/$@ - $@
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
@@ -326,7 +331,7 @@ shadow.byname: $(SHADOW) $(YPDIR)/Makefi
@@ -334,7 +339,7 @@ shadow.byname: $(SHADOW) $(YPDIR)/Makefi
@echo "Updating $@..."
@$(UMASK); \
$(AWK) -F: '{ if (FILENAME ~ /shadow$$/) { \
@ -58,7 +58,7 @@ diff -up ypserv-2.19/scripts/ypMakefile.in.nfsnobody ypserv-2.19/scripts/ypMakef
} else UID[$$1] = $$3; }' $(PASSWD) $(SHADOW) \
| $(DBLOAD) -s -i $(SHADOW) -o $(YPMAPDIR)/$@ - $@
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
@@ -345,7 +350,7 @@ group.byname: $(GROUP) $(GSHADOW) $(YPDI
@@ -353,7 +358,7 @@ group.byname: $(GROUP) $(GSHADOW) $(YPDI
@echo "Updating $@..."
@$(UMASK); \
$(MERGER) -g $(GROUP) $(GSHADOW) | \
@ -67,7 +67,7 @@ diff -up ypserv-2.19/scripts/ypMakefile.in.nfsnobody ypserv-2.19/scripts/ypMakef
print $$1"\t"$$0 }' | $(DBLOAD) -i $(GROUP) -o $(YPMAPDIR)/$@ - $@
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
@@ -353,7 +358,7 @@ group.bygid: $(GROUP) $(GSHADOW) $(YPDIR
@@ -361,7 +366,7 @@ group.bygid: $(GROUP) $(GSHADOW) $(YPDIR
@echo "Updating $@..."
@$(UMASK); \
$(MERGER) -g $(GROUP) $(GSHADOW) | \
@ -76,7 +76,7 @@ diff -up ypserv-2.19/scripts/ypMakefile.in.nfsnobody ypserv-2.19/scripts/ypMakef
print $$3"\t"$$0 }' | $(DBLOAD) -i $(GROUP) -o $(YPMAPDIR)/$@ - $@
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
@@ -362,7 +367,7 @@ else
@@ -370,7 +375,7 @@ else
group.byname: $(GROUP) $(YPDIR)/Makefile
@echo "Updating $@..."
@$(UMASK); \
@ -85,7 +85,7 @@ diff -up ypserv-2.19/scripts/ypMakefile.in.nfsnobody ypserv-2.19/scripts/ypMakef
print $$1"\t"$$0 }' $(GROUP) \
| $(DBLOAD) -i $(GROUP) -o $(YPMAPDIR)/$@ - $@
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
@@ -370,7 +375,7 @@ group.byname: $(GROUP) $(YPDIR)/Makefile
@@ -378,7 +383,7 @@ group.byname: $(GROUP) $(YPDIR)/Makefile
group.bygid: $(GROUP) $(YPDIR)/Makefile
@echo "Updating $@..."
@$(UMASK); \

View File

@ -1,7 +1,7 @@
diff -up ypserv-2.19/scripts/ypMakefile.in.redhat ypserv-2.19/scripts/ypMakefile.in
--- ypserv-2.19/scripts/ypMakefile.in.redhat 2004-04-14 14:08:25.000000000 +0200
+++ ypserv-2.19/scripts/ypMakefile.in 2008-09-25 13:07:19.000000000 +0200
@@ -101,8 +101,8 @@ target: Makefile
diff -up ./scripts/ypMakefile.in.redhat ./scripts/ypMakefile.in
--- ./scripts/ypMakefile.in.redhat 2012-01-27 15:53:03.000000000 +0100
+++ ./scripts/ypMakefile.in 2013-05-06 18:28:38.558327612 +0200
@@ -109,8 +109,8 @@ target: Makefile
# If you don't want some of these maps built, feel free to comment
# them out from this list.

View File

@ -3,8 +3,8 @@
Summary: The NIS (Network Information Service) server
Url: http://www.linux-nis.org/nis/ypserv/index.html
Name: ypserv
Version: 2.29
Release: 8%{?dist}
Version: 2.31
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source0: http://www.linux-nis.org/download/ypserv/ypserv-%{version}.tar.bz2
@ -25,17 +25,13 @@ Patch0: ypserv-2.5-redhat.patch
Patch1: ypserv-2.21-path.patch
Patch2: ypserv-2.5-nfsnobody2.patch
Patch3: ypserv-2.13-ypxfr-zeroresp.patch
Patch5: ypserv-2.13-nonedomain.patch
Patch6: ypserv-2.19-slp-warning.patch
Patch7: ypserv-2.24-manfix.patch
Patch8: ypserv-2.24-aliases.patch
Patch9: ypserv-2.25-systemd.patch
Patch16: ypserv-2.27-confpost.patch
Patch17: ypserv-2.27-cloexec.patch
Patch18: ypserv-2.29-sdnotify.patch
Patch19: ypserv-2.29-nomap.patch
Patch20: ypserv-2.29-relro.patch
Patch21: ypserv-2.29-dbopen.patch
Patch4: ypserv-2.13-nonedomain.patch
Patch5: ypserv-2.19-slp-warning.patch
Patch6: ypserv-2.24-manfix.patch
Patch7: ypserv-2.24-aliases.patch
Patch8: ypserv-2.27-confpost.patch
Patch9: ypserv-2.29-nomap.patch
Patch10: ypserv-2.29-relro.patch
BuildRequires: tokyocabinet-devel
BuildRequires: systemd-units
@ -64,17 +60,13 @@ machines.
%patch1 -p1 -b .path
%patch2 -p1 -b .nfsnobody
%patch3 -p1 -b .respzero
%patch5 -p1 -b .nonedomain
%patch6 -p1 -b .slp-warning
%patch7 -p1 -b .manfix
%patch8 -p1 -b .aliases
%patch9 -p1 -b .systemd
%patch16 -p1 -b .confpost
%patch17 -p1 -b .cloexec
%patch18 -p1 -b .sdnotify
%patch19 -p1 -b .nomap
%patch20 -p1 -b .relro
%patch21 -p1 -b .dbopen
%patch4 -p1 -b .nonedomain
%patch5 -p1 -b .slp-warning
%patch6 -p1 -b .manfix
%patch7 -p1 -b .aliases
%patch8 -p1 -b .confpost
%patch9 -p1 -b .nomap
%patch10 -p1 -b .relro
autoreconf
@ -266,6 +258,9 @@ fi
%{_includedir}/*/*
%changelog
* Mon May 06 2013 Honza Horak <hhorak@redhat.com> - 2.31-1
- Update to new upstream version
* Mon Feb 04 2013 Honza Horak <hhorak@redhat.com> - 2.29-8
- Stop ypserv daemon temporary when reading info about maps