[Glibc-bsd-commits] r3624 - in trunk/freebsd-utils/debian: . patches

Robert Millan rmh at alioth.debian.org
Thu Jul 21 18:15:01 UTC 2011


Author: rmh
Date: 2011-07-21 18:15:01 +0000 (Thu, 21 Jul 2011)
New Revision: 3624

Added:
   trunk/freebsd-utils/debian/patches/038_jail.diff
Modified:
   trunk/freebsd-utils/debian/changelog
   trunk/freebsd-utils/debian/control
   trunk/freebsd-utils/debian/freebsd-utils.install
   trunk/freebsd-utils/debian/freebsd-utils.manpages
   trunk/freebsd-utils/debian/patches/032_libbsd_overlay.diff
   trunk/freebsd-utils/debian/patches/series
   trunk/freebsd-utils/debian/rules
Log:
Port and install jail(8).

Modified: trunk/freebsd-utils/debian/changelog
===================================================================
--- trunk/freebsd-utils/debian/changelog	2011-07-21 11:19:18 UTC (rev 3623)
+++ trunk/freebsd-utils/debian/changelog	2011-07-21 18:15:01 UTC (rev 3624)
@@ -1,8 +1,9 @@
-freebsd-utils (8.2+ds2-3) UNRELEASED; urgency=low
+freebsd-utils (8.2+ds2-3) unstable; urgency=low
 
   * Replace usb.conf with version from 8-STABLE.
+  * Port and install jail(8).
 
- -- Robert Millan <rmh at debian.org>  Wed, 13 Jul 2011 18:17:31 +0200
+ -- Robert Millan <rmh at debian.org>  Thu, 21 Jul 2011 20:04:43 +0200
 
 freebsd-utils (8.2+ds2-2) experimental; urgency=low
 

Modified: trunk/freebsd-utils/debian/control
===================================================================
--- trunk/freebsd-utils/debian/control	2011-07-21 11:19:18 UTC (rev 3623)
+++ trunk/freebsd-utils/debian/control	2011-07-21 18:15:01 UTC (rev 3624)
@@ -33,6 +33,8 @@
  libexpat1-dev,
 # libtirpc-dev: mount_nfs, mountd, nfsd, rpc.lockd, rpc.statd
  libtirpc-dev,
+# libjail-dev: jail
+ libjail-dev,
 Vcs-Browser: http://svn.debian.org/wsvn/glibc-bsd/trunk/freebsd-utils/
 Vcs-Svn: svn://svn.debian.org/glibc-bsd/trunk/freebsd-utils/
 Standards-Version: 3.9.2
@@ -141,7 +143,6 @@
  server.
 
 # FIXME:
-# - add jail
 # - add ppp (ppp, pppd)
 # - add pf (pfctl + authpf + /etc stuff + init.d script)
 # - add ipfw (???)

Modified: trunk/freebsd-utils/debian/freebsd-utils.install
===================================================================
--- trunk/freebsd-utils/debian/freebsd-utils.install	2011-07-21 11:19:18 UTC (rev 3623)
+++ trunk/freebsd-utils/debian/freebsd-utils.install	2011-07-21 18:15:01 UTC (rev 3624)
@@ -40,3 +40,4 @@
 sbin/devfs/devfs			/sbin
 
 usr.sbin/acpi/acpiconf/acpiconf		/usr/sbin
+usr.sbin/jail/jail			/usr/sbin

Modified: trunk/freebsd-utils/debian/freebsd-utils.manpages
===================================================================
--- trunk/freebsd-utils/debian/freebsd-utils.manpages	2011-07-21 11:19:18 UTC (rev 3623)
+++ trunk/freebsd-utils/debian/freebsd-utils.manpages	2011-07-21 18:15:01 UTC (rev 3624)
@@ -29,3 +29,4 @@
 sbin/sysctl/sysctl.8
 sbin/umount/umount.8
 usr.sbin/acpi/acpiconf/acpiconf.8
+usr.sbin/jail/jail.8

Modified: trunk/freebsd-utils/debian/patches/032_libbsd_overlay.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/032_libbsd_overlay.diff	2011-07-21 11:19:18 UTC (rev 3623)
+++ trunk/freebsd-utils/debian/patches/032_libbsd_overlay.diff	2011-07-21 18:15:01 UTC (rev 3624)
@@ -104,3 +104,21 @@
  #include <stdlib.h>
  #include <string.h>
  #include <syslog.h>
+--- a/usr.sbin/jail/jail.c
++++ b/usr.sbin/jail/jail.c
+@@ -25,6 +25,7 @@
+  * SUCH DAMAGE.
+  */
+ 
++#include <stdio.h>
+ #include <sys/cdefs.h>
+ __FBSDID("$FreeBSD$");
+ 
+@@ -45,7 +46,6 @@
+ #include <netdb.h>
+ #include <paths.h>
+ #include <pwd.h>
+-#include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>

Added: trunk/freebsd-utils/debian/patches/038_jail.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/038_jail.diff	                        (rev 0)
+++ trunk/freebsd-utils/debian/patches/038_jail.diff	2011-07-21 18:15:01 UTC (rev 3624)
@@ -0,0 +1,39 @@
+--- a/usr.sbin/jail/jail.c
++++ b/usr.sbin/jail/jail.c
+@@ -42,7 +42,6 @@
+ #include <errno.h>
+ #include <grp.h>
+ #include <jail.h>
+-#include <login_cap.h>
+ #include <netdb.h>
+ #include <paths.h>
+ #include <pwd.h>
+@@ -93,9 +92,6 @@
+ 		else							\
+ 			errx(1, "%s: no such user", username);		\
+ 	}								\
+-	lcap = login_getpwclass(pwd);					\
+-	if (lcap == NULL)						\
+-		err(1, "getpwclass: %s", username);			\
+ 	ngroups = ngroups_max;						\
+ 	if (getgrouplist(username, pwd->pw_gid, groups, &ngroups) != 0)	\
+ 		err(1, "getgrouplist: %s", username);			\
+@@ -104,7 +100,6 @@
+ int
+ main(int argc, char **argv)
+ {
+-	login_cap_t *lcap = NULL;
+ 	struct passwd *pwd = NULL;
+ 	gid_t *groups;
+ 	size_t sysvallen;
+@@ -326,10 +321,6 @@
+ 			err(1, "setgroups");
+ 		if (setgid(pwd->pw_gid) != 0)
+ 			err(1, "setgid");
+-		if (setusercontext(lcap, pwd, pwd->pw_uid,
+-		    LOGIN_SETALL & ~LOGIN_SETGROUP & ~LOGIN_SETLOGIN) != 0)
+-			err(1, "setusercontext");
+-		login_close(lcap);
+ 	}
+ 	if (lflag) {
+ 		if (*pwd->pw_shell)

Modified: trunk/freebsd-utils/debian/patches/series
===================================================================
--- trunk/freebsd-utils/debian/patches/series	2011-07-21 11:19:18 UTC (rev 3623)
+++ trunk/freebsd-utils/debian/patches/series	2011-07-21 18:15:01 UTC (rev 3624)
@@ -33,3 +33,4 @@
 035_nfs.diff
 036_nfs_glibc.diff
 037_mount_autofs.diff
+038_jail.diff

Modified: trunk/freebsd-utils/debian/rules
===================================================================
--- trunk/freebsd-utils/debian/rules	2011-07-21 11:19:18 UTC (rev 3623)
+++ trunk/freebsd-utils/debian/rules	2011-07-21 18:15:01 UTC (rev 3624)
@@ -125,6 +125,7 @@
 	$(PMAKE) -C usr.bin/mkuzip
 	$(PMAKE) -C usr.sbin/acpi/acpiconf
 	$(PMAKE) -C usr.sbin/rpc.umntall
+	$(PMAKE) -C usr.sbin/jail
 	touch $@
 
 gbde: gbde-stamp
@@ -228,6 +229,7 @@
 	$(PMAKE) -C usr.bin/mkuzip clean
 	$(PMAKE) -C usr.sbin/acpi/acpiconf clean
 	$(PMAKE) -C usr.sbin/rpc.umntall clean
+	$(PMAKE) -C usr.sbin/jail clean
 
 	$(PMAKE) -C sbin/gbde clean
 




More information about the Glibc-bsd-commits mailing list