diff options
author | Ismael Luceno | 2019-05-27 19:17:10 +0200 |
---|---|---|
committer | Ismael Luceno | 2019-05-27 19:17:10 +0200 |
commit | 0c81a92812757917b32eedd1dcc20631028fbf65 (patch) | |
tree | fde09317f4e5b4bf65f4e14041447b56b9c12572 /net | |
parent | 84081ba0b9d865f14642537c73ba069f76025358 (diff) |
openbsd-inetd 0.20160825
Diffstat (limited to 'net')
-rwxr-xr-x | net/openbsd-inetd/BUILD | 6 | ||||
-rwxr-xr-x | net/openbsd-inetd/DEPENDS | 1 | ||||
-rwxr-xr-x | net/openbsd-inetd/DETAILS | 4 | ||||
-rw-r--r-- | net/openbsd-inetd/HISTORY | 4 | ||||
-rw-r--r-- | net/openbsd-inetd/patches/0000-portability.patch (renamed from net/openbsd-inetd/patches/portability.patch) | 144 |
5 files changed, 86 insertions, 73 deletions
diff --git a/net/openbsd-inetd/BUILD b/net/openbsd-inetd/BUILD index 66fd05f9ce..8e786de57e 100755 --- a/net/openbsd-inetd/BUILD +++ b/net/openbsd-inetd/BUILD @@ -1,3 +1,5 @@ +CFLAGS+=" -isystem \"$INSTALL_ROOT\"/usr/include/bsd -DLIBBSD_OVERLAY" && +CFLAGS+=" -isystem \"$INSTALL_ROOT\"/usr/include/tirpc" && bmake \ - CFLAGS="$CFLAGS -isystem $INSTALL_ROOT/usr/include/bsd -DLIBBSD_OVERLAY" \ - LDFLAGS="${LDFLAGS//-Wl,--as-needed} -lbsd" + CFLAGS="$CFLAGS" \ + LDFLAGS="${LDFLAGS//-Wl,--as-needed} -lbsd -ltirpc" diff --git a/net/openbsd-inetd/DEPENDS b/net/openbsd-inetd/DEPENDS index ed94dabe29..df8c202469 100755 --- a/net/openbsd-inetd/DEPENDS +++ b/net/openbsd-inetd/DEPENDS @@ -1,2 +1,3 @@ depends libbsd && +depends libtirpc && depends bmake diff --git a/net/openbsd-inetd/DETAILS b/net/openbsd-inetd/DETAILS index cb3be05103..b22a0cd627 100755 --- a/net/openbsd-inetd/DETAILS +++ b/net/openbsd-inetd/DETAILS @@ -1,8 +1,8 @@ SPELL=openbsd-inetd - VERSION=0.20140418 + VERSION=0.20160825 SOURCE="${SPELL}_$VERSION.orig.tar.xz" SOURCE_URL[0]=http://ftp.de.debian.org/debian/pool/main/o/$SPELL/$SOURCE - SOURCE_HASH=sha512:5000b18bc36879d99cc15e7e72aa6c4156a53c86350b6a5f0fb6658bd9479b448885af8d5cf6e7393113e5f33d238f6567d56a23652adc09b97137b3e4934c62 + SOURCE_HASH=sha512:406d711be2d8fd0caf9eb0357b6eb862bc8c398317d82fb6b9533d0965daa360c55139de8c69a2ff12c21b741e69ed160867d922840e8f5a07115c24c13f7d52 SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION" WEB_SITE="https://packages.debian.org/sid/openbsd-inetd" LICENSE[0]="ISC" diff --git a/net/openbsd-inetd/HISTORY b/net/openbsd-inetd/HISTORY index 6b4d1396c5..0df74106ea 100644 --- a/net/openbsd-inetd/HISTORY +++ b/net/openbsd-inetd/HISTORY @@ -1,3 +1,7 @@ +2019-05-27 Ismael Luceno <ismael@sourcemage.org> + * BUILD, DETAILS, patches/0000-portability.patch: + updated spell to 0.20160825 + 2016-08-14 Ismael Luceno <ismael@sourcemage.org> * PRE_BUILD: Use apply_patch_dir diff --git a/net/openbsd-inetd/patches/portability.patch b/net/openbsd-inetd/patches/0000-portability.patch index c354bafac9..3522c62b0f 100644 --- a/net/openbsd-inetd/patches/portability.patch +++ b/net/openbsd-inetd/patches/0000-portability.patch @@ -1,7 +1,6 @@ Author: Marco d'Itri -Portability patch. Taken from Debian, includes a few modifications by me -(Ismael Luceno). +Portability patch. Taken from Debian. --- a/inetd.8 +++ b/inetd.8 @@ -47,7 +46,7 @@ Portability patch. Taken from Debian, includes a few modifications by me Examples might be .Dq tcp or -@@ -368,9 +366,7 @@ If you have only one server on +@@ -364,9 +362,7 @@ If you have only one server on only IPv6 traffic will be routed to the server. .El .Sh SEE ALSO @@ -57,7 +56,7 @@ Portability patch. Taken from Debian, includes a few modifications by me .Xr ftpd 8 , .Xr identd 8 , .Xr talkd 8 -@@ -383,7 +379,23 @@ Support for Sun-RPC +@@ -379,7 +375,23 @@ Support for Sun-RPC based services is modelled after that provided by SunOS 4.1. IPv6 support was added by the KAME project in 1999. @@ -83,61 +82,52 @@ Portability patch. Taken from Debian, includes a few modifications by me This is largely because the --- a/inetd.c +++ b/inetd.c -@@ -128,6 +128,7 @@ +@@ -127,6 +127,7 @@ #include <sys/un.h> #include <sys/file.h> #include <sys/wait.h> +#include <time.h> #include <sys/time.h> #include <sys/resource.h> - -@@ -146,11 +147,12 @@ - #include <stdlib.h> + +@@ -147,14 +148,21 @@ #include <unistd.h> + #include <limits.h> #include <string.h> +#ifdef HAVE_SETUSERCONTEXT #include <login_cap.h> +#endif ++#ifdef HAVE_GETIFADDRS #include <ifaddrs.h> ++#endif #include <rpc/rpc.h> #include <rpc/pmap_clnt.h> -#include <rpcsvc/nfs_prot.h> + #include <event.h> #include "pathnames.h" - + ++#ifndef HAVE_PLEDGE ++#define pledge(a, b) (0) ++#endif ++ + #define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) + #define TOOMANY 256 /* don't start more than TOOMANY */ -@@ -324,14 +328,11 @@ main(int argc, char *argv[]) - fd_set *fdsrp = NULL; - int readablen = 0, ch; - struct servtab *sep; -- extern char *optarg; -- extern int optind; - - while ((ch = getopt(argc, argv, "dR:")) != -1) - switch (ch) { - case 'd': - debug = 1; -- options |= SO_DEBUG; - break; - case 'R': { /* invocation rate */ - char *p; -@@ -373,9 +374,13 @@ main(int argc, char *argv[]) - umask(022); - if (debug == 0) { - daemon(0, 0); +@@ -342,8 +350,10 @@ main(int argc, char *argv[]) + umask(022); + if (debug == 0) { + daemon(0, 0); +#ifdef HAVE_SETLOGIN - if (uid == 0) - (void) setlogin(""); + if (uid == 0) + (void) setlogin(""); +#endif - } -+ if (debug && uid == 0) -+ options |= SO_DEBUG; - - if (uid == 0) { - gid_t gid = getgid(); -@@ -420,6 +425,15 @@ main(int argc, char *argv[]) - sa.sa_handler = SIG_IGN; - sigaction(SIGPIPE, &sa, &sapipe); - + } + + if (pledge("stdio rpath cpath getpw dns inet unix proc exec id", NULL) == -1) +@@ -384,6 +394,15 @@ main(int argc, char *argv[]) + + signal(SIGPIPE, SIG_IGN); + + /* space for daemons to overwrite environment for ps */ + { +#define DUMMYSIZE 100 @@ -147,40 +137,56 @@ Portability patch. Taken from Debian, includes a few modifications by me + setenv("inetd_dummy", dummy, 1); + } + - for (;;) { - int n, ctrl = -1; - -@@ -576,9 +590,6 @@ dg_badinput(struct sockaddr *sa) - goto bad; - } - + event_dispatch(); + + return (0); +@@ -476,9 +495,6 @@ dg_badinput(struct sockaddr *sa) + goto bad; + } + - if (port < IPPORT_RESERVED || port == NFS_PORT) - goto bad; - - return (0); - + return (0); + bad: -@@ -1852,7 +1865,7 @@ print_service(char *action, struct servt - fprintf(stderr, - " wait.max=%d.%d user:group=%s:%s builtin=%lx server=%s\n", - sep->se_wait, sep->se_max, sep->se_user, +@@ -488,6 +504,7 @@ bad: + int + dg_broadcast(struct in_addr *in) + { ++#ifdef HAVE_GETIFADDRS + struct ifaddrs *ifa, *ifap; + struct sockaddr_in *sin; + +@@ -504,6 +521,7 @@ dg_broadcast(struct in_addr *in) + } + } + freeifaddrs(ifap); ++#endif + return (0); + } + +@@ -1690,7 +1708,7 @@ print_service(char *action, struct servt + fprintf(stderr, + " wait.max=%d.%d user:group=%s:%s builtin=%lx server=%s\n", + sep->se_wait, sep->se_max, sep->se_user, - sep->se_group ? sep->se_group : "wheel", + sep->se_group ? sep->se_group : "(default)", - (long)sep->se_bi, sep->se_server); + (long)sep->se_bi, sep->se_server); } - -@@ -1960,6 +1973,7 @@ spawn(struct servtab *sep, int ctrl) - if (uid != pwd->pw_uid) - exit(1); - } else { + +@@ -1799,6 +1817,7 @@ spawn(int ctrl, short events, void *xsep + if (uid != pwd->pw_uid) + exit(1); + } else { +#ifdef HAVE_SETUSERCONTEXT - tmpint = LOGIN_SETALL & - ~(LOGIN_SETGROUP|LOGIN_SETLOGIN); - if (pwd->pw_uid) -@@ -1975,6 +1989,53 @@ spawn(struct servtab *sep, int ctrl) - sep->se_service, sep->se_proto); - exit(1); - } + tmpint = LOGIN_SETALL & + ~(LOGIN_SETGROUP|LOGIN_SETLOGIN); + if (pwd->pw_uid) +@@ -1814,6 +1833,53 @@ spawn(int ctrl, short events, void *xsep + sep->se_service, sep->se_proto); + exit(1); + } +#else + /* what about setpriority(2), setrlimit(2), + * and umask(2)? The $PATH is cleared. @@ -228,6 +234,6 @@ Portability patch. Taken from Debian, includes a few modifications by me + } + } +#endif - } - if (debug) - fprintf(stderr, "%ld execv %s\n", + } + if (debug) + fprintf(stderr, "%ld execv %s\n", |