aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rc/rc.conf1
-rw-r--r--libexec/rc/rc.d/Makefile1
-rwxr-xr-xlibexec/rc/rc.d/ypupdated35
-rw-r--r--libexec/rtld-elf/rtld.c5
4 files changed, 40 insertions, 2 deletions
diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
index 07cb9803882c..bfa46bd343a6 100644
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -396,6 +396,7 @@ rpc_statd_flags="" # Flags to rpc.statd (if enabled).
rpcbind_enable="NO" # Run the portmapper service (YES/NO).
rpcbind_program="/usr/sbin/rpcbind" # path to rpcbind, if you want a different one.
rpcbind_flags="" # Flags to rpcbind (if enabled).
+rpc_ypupdated_enable="NO" # Run if NIS master and SecureRPC (or NO).
nfsv4_server_enable="NO" # Enable support for NFSv4
nfsv4_server_only="NO" # Set NFS server to NFSv4 only
nfscbd_enable="NO" # NFSv4 client side callback daemon
diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile
index 680b140865df..d0c6fc1dee46 100644
--- a/libexec/rc/rc.d/Makefile
+++ b/libexec/rc/rc.d/Makefile
@@ -318,6 +318,7 @@ YP= ypbind \
yppasswdd \
ypserv \
ypset \
+ ypupdated \
ypxfrd \
nisdomain
YPPACKAGE= yp
diff --git a/libexec/rc/rc.d/ypupdated b/libexec/rc/rc.d/ypupdated
new file mode 100755
index 000000000000..1a4c595c745a
--- /dev/null
+++ b/libexec/rc/rc.d/ypupdated
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+#
+
+# PROVIDE: ypupdated
+# REQUIRE: rpcbind ypserv
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name="ypupdated"
+rcvar="rpc_ypupdated_enable"
+
+: ${ypupdated_svcj_options:="net_basic"}
+
+load_rc_config $name
+
+command="/usr/sbin/rpc.${name}"
+start_precmd="rpc_ypupdated_precmd"
+
+rpc_ypupdated_precmd()
+{
+ local _domain
+
+ force_depend rpcbind || return 1
+ force_depend ypserv nis_server || return 1
+
+ _domain=`domainname`
+ if [ -z "$_domain" ]; then
+ warn "NIS domainname(1) is not set."
+ return 1
+ fi
+}
+
+run_rc_command "$1"
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 17196f55c271..8977d5947010 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -3031,7 +3031,7 @@ load_kpreload(const void *addr)
}
obj->mapbase = __DECONST(caddr_t, addr);
- obj->mapsize = segn->p_vaddr + segn->p_memsz - (Elf_Addr)addr;
+ obj->mapsize = segn->p_vaddr + segn->p_memsz;
obj->vaddrbase = 0;
obj->relocbase = obj->mapbase;
@@ -3060,7 +3060,8 @@ load_kpreload(const void *addr)
linkmap_add(obj); /* for GDB & dlinfo() */
max_stack_flags |= obj->stack_flags;
- LD_UTRACE(UTRACE_LOAD_OBJECT, obj, obj->mapbase, 0, 0, obj->path);
+ LD_UTRACE(UTRACE_LOAD_OBJECT, obj, obj->mapbase, obj->mapsize, 0,
+ obj->path);
return (0);
}