summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2013-07-05 05:47:10 +0000
committergrehan <grehan@FreeBSD.org>2013-07-05 05:47:10 +0000
commit6a7baaf83640e0eaa135d2f7a3c1d4401f1683bf (patch)
tree83ae82cf8f72af4b819f49aa52acdd97f74c6328 /usr.bin
parent2cb5a953f0a60811764ccaca7c37b51ff007c711 (diff)
parent8e6b84b998690dcfc1a4957dc7a483ac5b600db8 (diff)
downloadFreeBSD-src-6a7baaf83640e0eaa135d2f7a3c1d4401f1683bf.zip
FreeBSD-src-6a7baaf83640e0eaa135d2f7a3c1d4401f1683bf.tar.gz
IFC @ r252763
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/Makefile2
-rw-r--r--usr.bin/Makefile.amd641
-rw-r--r--usr.bin/Makefile.i3861
-rw-r--r--usr.bin/Makefile.ia641
-rw-r--r--usr.bin/Makefile.powerpc1
-rw-r--r--usr.bin/Makefile.sparc641
-rw-r--r--usr.bin/calendar/calendars/calendar.freebsd1
-rw-r--r--usr.bin/iconv/iconv.c2
-rw-r--r--usr.bin/kdump/kdump.c2
-rw-r--r--usr.bin/killall/killall.14
-rw-r--r--usr.bin/killall/killall.c11
-rw-r--r--usr.bin/mail/popen.c2
-rw-r--r--usr.bin/make/job.c4
-rw-r--r--usr.bin/mkcsmapper/lex.l2
-rw-r--r--usr.bin/mkesdb/lex.l2
-rw-r--r--usr.bin/patch/pch.c10
-rw-r--r--usr.bin/rwho/rwho.c131
-rw-r--r--usr.bin/svn/lib/libapr_util/Makefile6
-rw-r--r--usr.bin/svn/lib/libapr_util/apr_ldap.h52
-rw-r--r--usr.bin/svn/lib/libapr_util/apu.h37
-rw-r--r--usr.bin/svn/lib/libapr_util/apu_config.h67
-rw-r--r--usr.bin/truss/syscalls.c2
22 files changed, 263 insertions, 79 deletions
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index 535b2ab..0e7edf2 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -366,7 +366,7 @@ SUBDIR+= users
SUBDIR+= who
.endif
-.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "i386"
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "armv6"
.if ${MK_SVN} == "yes" || ${MK_SVNLITE} == "yes"
SUBDIR+= svn
.endif
diff --git a/usr.bin/Makefile.amd64 b/usr.bin/Makefile.amd64
index b720e3d..fee2fb0 100644
--- a/usr.bin/Makefile.amd64
+++ b/usr.bin/Makefile.amd64
@@ -1,2 +1,3 @@
# $FreeBSD$
+SUBDIR+= smbutil
diff --git a/usr.bin/Makefile.i386 b/usr.bin/Makefile.i386
index b720e3d..fee2fb0 100644
--- a/usr.bin/Makefile.i386
+++ b/usr.bin/Makefile.i386
@@ -1,2 +1,3 @@
# $FreeBSD$
+SUBDIR+= smbutil
diff --git a/usr.bin/Makefile.ia64 b/usr.bin/Makefile.ia64
index b720e3d..fee2fb0 100644
--- a/usr.bin/Makefile.ia64
+++ b/usr.bin/Makefile.ia64
@@ -1,2 +1,3 @@
# $FreeBSD$
+SUBDIR+= smbutil
diff --git a/usr.bin/Makefile.powerpc b/usr.bin/Makefile.powerpc
index b720e3d..fee2fb0 100644
--- a/usr.bin/Makefile.powerpc
+++ b/usr.bin/Makefile.powerpc
@@ -1,2 +1,3 @@
# $FreeBSD$
+SUBDIR+= smbutil
diff --git a/usr.bin/Makefile.sparc64 b/usr.bin/Makefile.sparc64
index b720e3d..fee2fb0 100644
--- a/usr.bin/Makefile.sparc64
+++ b/usr.bin/Makefile.sparc64
@@ -1,2 +1,3 @@
# $FreeBSD$
+SUBDIR+= smbutil
diff --git a/usr.bin/calendar/calendars/calendar.freebsd b/usr.bin/calendar/calendars/calendar.freebsd
index b1a05c1..333eebc 100644
--- a/usr.bin/calendar/calendars/calendar.freebsd
+++ b/usr.bin/calendar/calendars/calendar.freebsd
@@ -62,6 +62,7 @@
02/14 Manolis Kiagias <manolis@FreeBSD.org> born in Chania, Greece, 1970
02/14 Erwin Lansing <erwin@FreeBSD.org> born in 's-Hertogenbosch, the Netherlands, 1975
02/14 Martin Blapp <mbr@FreeBSD.org> born in Olten, Switzerland, 1976
+02/15 Hiren Panchasara <hiren@FreeBSD.org> born in Ahmedabad, Gujarat, India, 1984
02/19 Murray Stokely <murray@FreeBSD.org> born in Jacksonville, Florida, United States, 1979
02/20 Anders Nordby <anders@FreeBSD.org> born in Oslo, Norway, 1976
02/21 Alexey Zelkin <phantom@FreeBSD.org> born in Simferopol, Ukraine, 1978
diff --git a/usr.bin/iconv/iconv.c b/usr.bin/iconv/iconv.c
index f7bd0a36..77dd11a 100644
--- a/usr.bin/iconv/iconv.c
+++ b/usr.bin/iconv/iconv.c
@@ -74,7 +74,7 @@ do_conv(FILE *fp, const char *from, const char *to, bool silent,
{
iconv_t cd;
char inbuf[INBUFSIZE], outbuf[OUTBUFSIZE], *out;
- char *in;
+ const char *in;
size_t inbytes, outbytes, ret;
if ((cd = iconv_open(to, from)) == (iconv_t)-1)
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index 550c4cb..77a0cae 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -1482,6 +1482,8 @@ ktrsockaddr(struct sockaddr *sa)
TODO: Support additional address families
#include <netnatm/natm.h>
struct sockaddr_natm *natm;
+ #include <netsmb/netbios.h>
+ struct sockaddr_nb *nb;
*/
char addr[64];
diff --git a/usr.bin/killall/killall.1 b/usr.bin/killall/killall.1
index 7beaadb..be813f7 100644
--- a/usr.bin/killall/killall.1
+++ b/usr.bin/killall/killall.1
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd June 27, 2012
+.Dd June 30, 2013
.Dt KILLALL 1
.Os
.Sh NAME
@@ -110,6 +110,8 @@ the specified
Limit potentially matching processes to those matching
the specified
.Ar procname .
+.It Fl q
+Suppress error message if no processes are matched.
.It Fl z
Do not skip zombies.
This should not have any effect except to print a few error messages
diff --git a/usr.bin/killall/killall.c b/usr.bin/killall/killall.c
index 83e829a..dd22a83 100644
--- a/usr.bin/killall/killall.c
+++ b/usr.bin/killall/killall.c
@@ -53,7 +53,7 @@ static void __dead2
usage(void)
{
- fprintf(stderr, "usage: killall [-delmsvz] [-help] [-I] [-j jail]\n");
+ fprintf(stderr, "usage: killall [-delmsqvz] [-help] [-I] [-j jail]\n");
fprintf(stderr,
" [-u user] [-t tty] [-c cmd] [-SIGNAL] [cmd]...\n");
fprintf(stderr, "At least one option or argument to specify processes must be given.\n");
@@ -101,6 +101,7 @@ main(int ac, char **av)
char *user = NULL;
char *tty = NULL;
char *cmd = NULL;
+ int qflag = 0;
int vflag = 0;
int sflag = 0;
int dflag = 0;
@@ -191,6 +192,9 @@ main(int ac, char **av)
errx(1, "must specify procname");
cmd = *av;
break;
+ case 'q':
+ qflag++;
+ break;
case 'v':
vflag++;
break;
@@ -417,8 +421,9 @@ main(int ac, char **av)
}
}
if (killed == 0) {
- fprintf(stderr, "No matching processes %swere found\n",
- getuid() != 0 ? "belonging to you " : "");
+ if (!qflag)
+ fprintf(stderr, "No matching processes %swere found\n",
+ getuid() != 0 ? "belonging to you " : "");
errors = 1;
}
exit(errors);
diff --git a/usr.bin/mail/popen.c b/usr.bin/mail/popen.c
index c4d1746..60a0936 100644
--- a/usr.bin/mail/popen.c
+++ b/usr.bin/mail/popen.c
@@ -316,7 +316,7 @@ sigchild(int signo __unused)
int status;
struct child *cp;
- while ((pid = waitpid((pid_t)-1, &status, WNOHANG)) > 0) {
+ while ((pid = waitpid(-1, &status, WNOHANG)) > 0) {
cp = findchild(pid);
if (cp->free)
delchild(cp);
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index bc1d6a0..6fee0ec 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -2128,7 +2128,7 @@ Job_CatchChildren(Boolean block)
}
for (;;) {
- pid = waitpid((pid_t)-1, &status,
+ pid = waitpid(-1, &status,
(block ? 0 : WNOHANG) | WUNTRACED);
if (pid <= 0)
break;
@@ -2628,7 +2628,7 @@ Job_AbortAll(void)
/*
* Catch as many children as want to report in at first, then give up
*/
- while (waitpid((pid_t)-1, &foo, WNOHANG) > 0)
+ while (waitpid(-1, &foo, WNOHANG) > 0)
;
}
diff --git a/usr.bin/mkcsmapper/lex.l b/usr.bin/mkcsmapper/lex.l
index 4ba7fc4..33b7f8e 100644
--- a/usr.bin/mkcsmapper/lex.l
+++ b/usr.bin/mkcsmapper/lex.l
@@ -41,6 +41,8 @@
#include "ldef.h"
#include "yacc.h"
+#define YY_DECL int yylex(void)
+
int linenumber = 1;
%}
%option noinput
diff --git a/usr.bin/mkesdb/lex.l b/usr.bin/mkesdb/lex.l
index 19c5379..c9d9cc1 100644
--- a/usr.bin/mkesdb/lex.l
+++ b/usr.bin/mkesdb/lex.l
@@ -43,6 +43,8 @@
#include "ldef.h"
#include "yacc.h"
+#define YY_DECL int yylex(void)
+
int linenumber = 1;
%}
%option noinput
diff --git a/usr.bin/patch/pch.c b/usr.bin/patch/pch.c
index 411dcac..c6224e7 100644
--- a/usr.bin/patch/pch.c
+++ b/usr.bin/patch/pch.c
@@ -101,13 +101,17 @@ void
open_patch_file(const char *filename)
{
struct stat filestat;
+ int nr, nw;
if (filename == NULL || *filename == '\0' || strEQ(filename, "-")) {
pfp = fopen(TMPPATNAME, "w");
if (pfp == NULL)
pfatal("can't create %s", TMPPATNAME);
- while (fgets(buf, buf_size, stdin) != NULL)
- fputs(buf, pfp);
+ while ((nr = fread(buf, 1, buf_size, stdin)) > 0) {
+ nw = fwrite(buf, 1, nr, pfp);
+ if (nr != nw)
+ pfatal("write error to %s", TMPPATNAME);
+ }
if (ferror(pfp) || fclose(pfp))
pfatal("can't write %s", TMPPATNAME);
filename = TMPPATNAME;
@@ -1200,7 +1204,7 @@ pgets(bool do_indent)
indent++;
}
}
- strncpy(buf, line, len - skipped);
+ memcpy(buf, line, len - skipped);
buf[len - skipped] = '\0';
}
return len;
diff --git a/usr.bin/rwho/rwho.c b/usr.bin/rwho/rwho.c
index 5f1334f..bcb5adb 100644
--- a/usr.bin/rwho/rwho.c
+++ b/usr.bin/rwho/rwho.c
@@ -1,6 +1,7 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
+/*-
+ * Copyright (c) 1983, 1993 The Regents of the University of California.
+ * Copyright (c) 2013 Mariusz Zaborski <oshogbo@FreeBSD.org>
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,6 +43,7 @@ static char sccsid[] = "@(#)rwho.c 8.1 (Berkeley) 6/6/93";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/capability.h>
#include <sys/param.h>
#include <sys/file.h>
@@ -49,6 +51,7 @@ __FBSDID("$FreeBSD$");
#include <dirent.h>
#include <err.h>
+#include <errno.h>
#include <langinfo.h>
#include <locale.h>
#include <stdio.h>
@@ -58,22 +61,21 @@ __FBSDID("$FreeBSD$");
#include <timeconv.h>
#include <unistd.h>
-static DIR *dirp;
+#define NUSERS 1000
+#define WHDRSIZE (ssize_t)(sizeof(wd) - sizeof(wd.wd_we))
+/*
+ * this macro should be shared with ruptime.
+ */
+#define down(w,now) ((now) - (w)->wd_recvtime > 11 * 60)
+static DIR *dirp;
static struct whod wd;
-#define NUSERS 1000
+static int nusers;
static struct myutmp {
char myhost[sizeof(wd.wd_hostname)];
int myidle;
struct outmp myutmp;
} myutmp[NUSERS];
-static int nusers;
-
-#define WHDRSIZE (ssize_t)(sizeof (wd) - sizeof (wd.wd_we))
-/*
- * this macro should be shared with ruptime.
- */
-#define down(w,now) ((now) - (w)->wd_recvtime > 11 * 60)
static time_t now;
static int aflg;
@@ -88,17 +90,20 @@ main(int argc, char *argv[])
struct dirent *dp;
int width;
ssize_t cc;
- register struct whod *w = &wd;
- register struct whoent *we;
- register struct myutmp *mp;
+ struct whod *w;
+ struct whoent *we;
+ struct myutmp *mp;
int f, n, i;
int d_first;
+ int dfd;
+ time_t ct;
+ w = &wd;
(void) setlocale(LC_TIME, "");
d_first = (*nl_langinfo(D_MD_ORDER) == 'd');
- while ((ch = getopt(argc, argv, "a")) != -1)
- switch((char)ch) {
+ while ((ch = getopt(argc, argv, "a")) != -1) {
+ switch ((char)ch) {
case 'a':
aflg = 1;
break;
@@ -106,52 +111,73 @@ main(int argc, char *argv[])
default:
usage();
}
+ }
argc -= optind;
argv += optind;
if (argc != 0)
usage();
- if (chdir(_PATH_RWHODIR) || (dirp = opendir(".")) == NULL)
- err(1, "%s", _PATH_RWHODIR);
+ if (chdir(_PATH_RWHODIR) < 0)
+ err(1, "chdir(%s)", _PATH_RWHODIR);
+ if ((dirp = opendir(".")) == NULL)
+ err(1, "opendir(%s)", _PATH_RWHODIR);
+ dfd = dirfd(dirp);
mp = myutmp;
- (void)time(&now);
- while ((dp = readdir(dirp))) {
- if (dp->d_ino == 0 || strncmp(dp->d_name, "whod.", 5))
+ if (cap_rights_limit(dfd, CAP_READ | CAP_LOOKUP) < 0 && errno != ENOSYS)
+ err(1, "cap_rights_limit failed: %s", _PATH_RWHODIR);
+ /*
+ * Cache files required for time(3) and localtime(3) before entering
+ * capability mode.
+ */
+ (void) time(&ct);
+ (void) localtime(&ct);
+ if (cap_enter() < 0 && errno != ENOSYS)
+ err(1, "cap_enter");
+ (void) time(&now);
+ while ((dp = readdir(dirp)) != NULL) {
+ if (dp->d_ino == 0 || strncmp(dp->d_name, "whod.", 5) != 0)
continue;
- f = open(dp->d_name, O_RDONLY);
+ f = openat(dfd, dp->d_name, O_RDONLY);
if (f < 0)
continue;
- cc = read(f, (char *)&wd, sizeof (struct whod));
+ if (cap_rights_limit(f, CAP_READ) < 0 && errno != ENOSYS)
+ err(1, "cap_rights_limit failed: %s", dp->d_name);
+ cc = read(f, (char *)&wd, sizeof(struct whod));
if (cc < WHDRSIZE) {
(void) close(f);
continue;
}
- if (down(w,now)) {
+ if (down(w, now) != 0) {
(void) close(f);
continue;
}
cc -= WHDRSIZE;
we = w->wd_we;
- for (n = cc / sizeof (struct whoent); n > 0; n--) {
- if (aflg == 0 && we->we_idle >= 60*60) {
+ for (n = cc / sizeof(struct whoent); n > 0; n--) {
+ if (aflg == 0 && we->we_idle >= 60 * 60) {
we++;
continue;
}
if (nusers >= NUSERS)
errx(1, "too many users");
- mp->myutmp = we->we_utmp; mp->myidle = we->we_idle;
+ mp->myutmp = we->we_utmp;
+ mp->myidle = we->we_idle;
(void) strcpy(mp->myhost, w->wd_hostname);
- nusers++; we++; mp++;
+ nusers++;
+ we++;
+ mp++;
}
(void) close(f);
}
- qsort((char *)myutmp, nusers, sizeof (struct myutmp), utmpcmp);
+ qsort((char *)myutmp, nusers, sizeof(struct myutmp), utmpcmp);
mp = myutmp;
width = 0;
for (i = 0; i < nusers; i++) {
/* append one for the blank and use 8 for the out_line */
- int j = strlen(mp->myhost) + 1 + sizeof(mp->myutmp.out_line);
+ int j;
+
+ j = strlen(mp->myhost) + 1 + sizeof(mp->myutmp.out_line);
if (j > width)
width = j;
mp++;
@@ -159,31 +185,29 @@ main(int argc, char *argv[])
mp = myutmp;
for (i = 0; i < nusers; i++) {
char buf[BUFSIZ], cbuf[80];
- time_t t = _int_to_time(mp->myutmp.out_time);
+ time_t t;
- strftime(cbuf, sizeof(cbuf),
- d_first ? "%e %b %R" : "%b %e %R",
- localtime(&t));
- (void)sprintf(buf, "%s:%-.*s", mp->myhost,
- (int)sizeof(mp->myutmp.out_line), mp->myutmp.out_line);
+ t = _int_to_time(mp->myutmp.out_time);
+ strftime(cbuf, sizeof(cbuf), d_first ? "%e %b %R" : "%b %e %R",
+ localtime(&t));
+ (void) sprintf(buf, "%s:%-.*s", mp->myhost,
+ (int)sizeof(mp->myutmp.out_line), mp->myutmp.out_line);
printf("%-*.*s %-*s %s",
- (int)sizeof(mp->myutmp.out_name),
- (int)sizeof(mp->myutmp.out_name),
- mp->myutmp.out_name,
- width,
- buf,
- cbuf);
+ (int)sizeof(mp->myutmp.out_name),
+ (int)sizeof(mp->myutmp.out_name),
+ mp->myutmp.out_name, width, buf, cbuf);
mp->myidle /= 60;
- if (mp->myidle) {
- if (aflg) {
- if (mp->myidle >= 100*60)
- mp->myidle = 100*60 - 1;
+ if (mp->myidle != 0) {
+ if (aflg != 0) {
+ if (mp->myidle >= 100 * 60)
+ mp->myidle = 100 * 60 - 1;
if (mp->myidle >= 60)
printf(" %2d", mp->myidle / 60);
else
printf(" ");
- } else
+ } else {
printf(" ");
+ }
printf(":%02d", mp->myidle % 60);
}
printf("\n");
@@ -196,6 +220,7 @@ main(int argc, char *argv[])
static void
usage(void)
{
+
fprintf(stderr, "usage: rwho [-a]\n");
exit(1);
}
@@ -208,12 +233,12 @@ utmpcmp(const void *u1, const void *u2)
int rc;
rc = strncmp(MYUTMP(u1)->myutmp.out_name, MYUTMP(u2)->myutmp.out_name,
- sizeof(MYUTMP(u2)->myutmp.out_name));
- if (rc)
+ sizeof(MYUTMP(u2)->myutmp.out_name));
+ if (rc != 0)
return (rc);
rc = strcmp(MYUTMP(u1)->myhost, MYUTMP(u2)->myhost);
- if (rc)
+ if (rc != 0)
return (rc);
- return (strncmp(MYUTMP(u1)->myutmp.out_line, MYUTMP(u2)->myutmp.out_line,
- sizeof(MYUTMP(u2)->myutmp.out_line)));
+ return (strncmp(MYUTMP(u1)->myutmp.out_line,
+ MYUTMP(u2)->myutmp.out_line, sizeof(MYUTMP(u2)->myutmp.out_line)));
}
diff --git a/usr.bin/svn/lib/libapr_util/Makefile b/usr.bin/svn/lib/libapr_util/Makefile
index 37b787b..4d82443 100644
--- a/usr.bin/svn/lib/libapr_util/Makefile
+++ b/usr.bin/svn/lib/libapr_util/Makefile
@@ -28,5 +28,11 @@ CFLAGS+= -DHAVE_CONFIG_H \
-I${APR}/include/arch/unix \
-I${APR}/include
+.include <bsd.own.mk>
+
+.if ${MK_ICONV} == "yes"
+CFLAGS+= -DHAVE_ICONV_H=1 -DAPU_HAVE_ICONV=1
+.endif
+
.include <bsd.lib.mk>
diff --git a/usr.bin/svn/lib/libapr_util/apr_ldap.h b/usr.bin/svn/lib/libapr_util/apr_ldap.h
index c0bb0b2..27a96de 100644
--- a/usr.bin/svn/lib/libapr_util/apr_ldap.h
+++ b/usr.bin/svn/lib/libapr_util/apr_ldap.h
@@ -41,6 +41,7 @@
#define APR_HAS_MOZILLA_LDAPSDK 0
#define APR_HAS_OPENLDAP_LDAPSDK 0
#define APR_HAS_MICROSOFT_LDAPSDK 0
+#define APR_HAS_TIVOLI_LDAPSDK 0
#define APR_HAS_ZOS_LDAPSDK 0
#define APR_HAS_OTHER_LDAPSDK 0
@@ -58,7 +59,11 @@
* apr_ldap_url_parse*() functions have been rewritten specifically for
* APR, so the APR_HAS_LDAP_URL_PARSE macro is forced to zero.
*/
+#if APR_HAS_TIVOLI_LDAPSDK
+#define APR_HAS_LDAP_SSL 0
+#else
#define APR_HAS_LDAP_SSL 1
+#endif
#define APR_HAS_LDAP_URL_PARSE 0
#if APR_HAS_OPENLDAP_LDAPSDK && !defined(LDAP_DEPRECATED)
@@ -98,15 +103,19 @@
/*
* For ldap function calls that input a size limit on the number of returned elements
* Some SDKs do not have the define for LDAP_DEFAULT_LIMIT (-1) or LDAP_NO_LIMIT (0)
+ * LDAP_DEFAULT_LIMIT is preferred as it allows inheritance from whatever the SDK
+ * or process is configured for.
*/
-#if APR_HAS_ZOS_LDAPSDK
-#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT
-#else
#ifdef LDAP_DEFAULT_LIMIT
#define APR_LDAP_SIZELIMIT LDAP_DEFAULT_LIMIT
#else
-#define APR_LDAP_SIZELIMIT -1 /* equivalent to LDAP_DEFAULT_LIMIT */
+#ifdef LDAP_NO_LIMIT
+#define APR_LDAP_SIZELIMIT LDAP_NO_LIMIT
+#endif
#endif
+
+#ifndef APR_LDAP_SIZELIMIT
+#define APR_LDAP_SIZELIMIT 0 /* equivalent to LDAP_NO_LIMIT, and what goes on the wire */
#endif
/*
@@ -147,10 +156,43 @@ typedef struct apr_ldap_err_t {
}
#endif
+/* The MS SDK returns LDAP_UNAVAILABLE when the backend has closed the connection
+ * between LDAP calls. Protect with APR_HAS_MICROSOFT_LDAPSDK in case someone
+ * manually chooses another SDK on Windows
+ */
+#if APR_HAS_MICROSOFT_LDAPSDK
+#define APR_LDAP_IS_SERVER_DOWN(s) ((s) == LDAP_SERVER_DOWN \
+ || (s) == LDAP_UNAVAILABLE)
+#else
+#define APR_LDAP_IS_SERVER_DOWN(s) ((s) == LDAP_SERVER_DOWN)
+#endif
+
+/* These symbols are not actually exported in a DSO build, but mapped into
+ * a private exported function array for apr_ldap_stub to bind dynamically.
+ * Rename them appropriately to protect the global namespace.
+ */
+#ifdef APU_DSO_LDAP_BUILD
+
+#define apr_ldap_info apr__ldap_info
+#define apr_ldap_init apr__ldap_init
+#define apr_ldap_ssl_init apr__ldap_ssl_init
+#define apr_ldap_ssl_deinit apr__ldap_ssl_deinit
+#define apr_ldap_get_option apr__ldap_get_option
+#define apr_ldap_set_option apr__ldap_set_option
+#define apr_ldap_rebind_init apr__ldap_rebind_init
+#define apr_ldap_rebind_add apr__ldap_rebind_add
+#define apr_ldap_rebind_remove apr__ldap_rebind_remove
+
+#define APU_DECLARE_LDAP(type) type
+#else
+#define APU_DECLARE_LDAP(type) APU_DECLARE(type)
+#endif
+
#include "apr_ldap_url.h"
#include "apr_ldap_init.h"
#include "apr_ldap_option.h"
+#include "apr_ldap_rebind.h"
-/** @} */
#endif /* APR_HAS_LDAP */
+/** @} */
#endif /* APU_LDAP_H */
diff --git a/usr.bin/svn/lib/libapr_util/apu.h b/usr.bin/svn/lib/libapr_util/apu.h
index fc173e2..ea090bf 100644
--- a/usr.bin/svn/lib/libapr_util/apu.h
+++ b/usr.bin/svn/lib/libapr_util/apu.h
@@ -48,25 +48,41 @@
* use the most appropriate calling convention. Public APR functions with
* variable arguments must use APU_DECLARE_NONSTD().
*
- * @deffunc APU_DECLARE(rettype) apr_func(args);
+ * @fn APU_DECLARE(rettype) apr_func(args);
*/
#define APU_DECLARE(type) type
/**
* The public APR-UTIL functions using variable arguments are declared with
* APU_DECLARE_NONSTD(), as they must use the C language calling convention.
*
- * @deffunc APU_DECLARE_NONSTD(rettype) apr_func(args, ...);
+ * @fn APU_DECLARE_NONSTD(rettype) apr_func(args, ...);
*/
#define APU_DECLARE_NONSTD(type) type
/**
* The public APR-UTIL variables are declared with APU_DECLARE_DATA.
* This assures the appropriate indirection is invoked at compile time.
*
- * @deffunc APU_DECLARE_DATA type apr_variable;
- * @tip APU_DECLARE_DATA extern type apr_variable; syntax is required for
+ * @fn APU_DECLARE_DATA type apr_variable;
+ * @note APU_DECLARE_DATA extern type apr_variable; syntax is required for
* declarations within headers to properly import the variable.
*/
#define APU_DECLARE_DATA
+
+#if !defined(WIN32) || defined(APU_MODULE_DECLARE_STATIC)
+/**
+ * Declare a dso module's exported module structure as APU_MODULE_DECLARE_DATA.
+ *
+ * Unless APU_MODULE_DECLARE_STATIC is defined at compile time, symbols
+ * declared with APU_MODULE_DECLARE_DATA are always exported.
+ * @code
+ * module APU_MODULE_DECLARE_DATA mod_tag
+ * @endcode
+ */
+#define APU_MODULE_DECLARE_DATA
+#else
+#define APU_MODULE_DECLARE_DATA __declspec(dllexport)
+#endif
+
/*
* we always have SDBM (it's in our codebase)
*/
@@ -77,15 +93,26 @@
#if APU_HAVE_DB
#define APU_HAVE_DB_VERSION 0
-#endif /* APU_HAVE_DB */
+#endif
#define APU_HAVE_PGSQL 0
#define APU_HAVE_MYSQL 0
#define APU_HAVE_SQLITE3 0
#define APU_HAVE_SQLITE2 0
+#define APU_HAVE_ORACLE 0
+#define APU_HAVE_FREETDS 0
+#define APU_HAVE_ODBC 0
+
+#define APU_HAVE_CRYPTO 0
+#define APU_HAVE_OPENSSL 0
+#define APU_HAVE_NSS 0
+#ifndef APU_HAVE_APR_ICONV
#define APU_HAVE_APR_ICONV 0
+#endif
+#ifndef APU_HAVE_ICONV
#define APU_HAVE_ICONV 0
+#endif
#define APR_HAS_XLATE (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)
#endif /* APU_H */
diff --git a/usr.bin/svn/lib/libapr_util/apu_config.h b/usr.bin/svn/lib/libapr_util/apu_config.h
index cb4e932..ac247d0 100644
--- a/usr.bin/svn/lib/libapr_util/apu_config.h
+++ b/usr.bin/svn/lib/libapr_util/apu_config.h
@@ -6,9 +6,18 @@
/* Define if the system crypt() function is threadsafe */
/* #undef APU_CRYPT_THREADSAFE */
+/* Define to 1 if modular components are built as DSOs */
+/* #undef APU_DSO_BUILD */
+
+/* Define to be absolute path to DSO directory */
+/* #undef APU_DSO_LIBDIR */
+
/* Define if the inbuf parm to iconv() is const char ** */
/* #undef APU_ICONV_INBUF_CONST */
+/* Define that OpenSSL uses const buffers */
+#define CRYPTO_OPENSSL_CONST_BUFFERS 1
+
/* Define if crypt_r has uses CRYPTD */
/* #undef CRYPT_R_CRYPTD */
@@ -21,9 +30,16 @@
/* Define to 1 if you have the `crypt_r' function. */
/* #undef HAVE_CRYPT_R */
+/* Define to 1 if you have the declaration of `EVP_PKEY_CTX_new', and to 0 if
+ you don't. */
+#define HAVE_DECL_EVP_PKEY_CTX_NEW 1
+
/* Define if expat.h is available */
#define HAVE_EXPAT_H 1
+/* Define to 1 if you have the <freetds/sybdb.h> header file. */
+/* #undef HAVE_FREETDS_SYBDB_H */
+
/* Define to 1 if you have the <iconv.h> header file. */
/* #undef HAVE_ICONV_H */
@@ -42,9 +58,6 @@
/* Define to 1 if you have the <ldap_ssl.h> header file. */
/* #undef HAVE_LDAP_SSL_H */
-/* Define to 1 if you have the `lber' library (-llber). */
-/* #undef HAVE_LIBLBER */
-
/* Define to 1 if you have the <libpq-fe.h> header file. */
/* #undef HAVE_LIBPQ_FE_H */
@@ -57,18 +70,57 @@
/* Define to 1 if you have the <mysql/mysql.h> header file. */
/* #undef HAVE_MYSQL_MYSQL_H */
+/* Define to 1 if you have the <mysql/my_global.h> header file. */
+/* #undef HAVE_MYSQL_MY_GLOBAL_H */
+
+/* Define to 1 if you have the <mysql/my_sys.h> header file. */
+/* #undef HAVE_MYSQL_MY_SYS_H */
+
+/* Define to 1 if you have the <my_global.h> header file. */
+/* #undef HAVE_MY_GLOBAL_H */
+
+/* Define to 1 if you have the <my_sys.h> header file. */
+/* #undef HAVE_MY_SYS_H */
+
/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1
+/* Define to 1 if you have the <nss.h> header file. */
+/* #undef HAVE_NSS_H */
+
+/* Define to 1 if you have the <nss/nss.h> header file. */
+/* #undef HAVE_NSS_NSS_H */
+
+/* Define to 1 if you have the <nss/pk11pub.h> header file. */
+/* #undef HAVE_NSS_PK11PUB_H */
+
+/* Define to 1 if you have the <oci.h> header file. */
+/* #undef HAVE_OCI_H */
+
+/* Define to 1 if you have the <odbc/sql.h> header file. */
+/* #undef HAVE_ODBC_SQL_H */
+
+/* Define to 1 if you have the <openssl/x509.h> header file. */
+#define HAVE_OPENSSL_X509_H 1
+
+/* Define to 1 if you have the <pk11pub.h> header file. */
+/* #undef HAVE_PK11PUB_H */
+
/* Define to 1 if you have the <postgresql/libpq-fe.h> header file. */
/* #undef HAVE_POSTGRESQL_LIBPQ_FE_H */
+/* Define to 1 if you have the <prerror.h> header file. */
+/* #undef HAVE_PRERROR_H */
+
/* Define to 1 if you have the <sqlite3.h> header file. */
/* #undef HAVE_SQLITE3_H */
/* Define to 1 if you have the <sqlite.h> header file. */
/* #undef HAVE_SQLITE_H */
+/* Define to 1 if you have the <sql.h> header file. */
+/* #undef HAVE_SQL_H */
+
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
@@ -81,6 +133,9 @@
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
+/* Define to 1 if you have the <sybdb.h> header file. */
+/* #undef HAVE_SYBDB_H */
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
@@ -99,6 +154,9 @@
/* Define if xml/xmlparse.h is available */
/* #undef HAVE_XML_XMLPARSE_H */
+/* Define if ldap_set_rebind_proc takes three arguments */
+/* #undef LDAP_SET_REBIND_PROC_THREE */
+
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
@@ -111,6 +169,9 @@
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c
index 0afd083..1a9c4de 100644
--- a/usr.bin/truss/syscalls.c
+++ b/usr.bin/truss/syscalls.c
@@ -343,7 +343,7 @@ static struct xlat open_flags[] = {
X(O_RDONLY) X(O_WRONLY) X(O_RDWR) X(O_ACCMODE) X(O_NONBLOCK)
X(O_APPEND) X(O_SHLOCK) X(O_EXLOCK) X(O_ASYNC) X(O_FSYNC)
X(O_NOFOLLOW) X(O_CREAT) X(O_TRUNC) X(O_EXCL) X(O_NOCTTY)
- X(O_DIRECT) XEND
+ X(O_DIRECT) X(O_DIRECTORY) X(O_EXEC) X(O_TTY_INIT) X(O_CLOEXEC) XEND
};
static struct xlat shutdown_arg[] = {
OpenPOWER on IntegriCloud