regression with jexec?

Jamie Gritton jamie at FreeBSD.org
Sun Jul 26 00:08:15 UTC 2009


Michael Butler wrote:

> After a clean rebuild ('rm -rf /usr/obj/*') ..
> 
> imb at aaron:/home/imb> uname -a
> FreeBSD aaron.protected-networks.net 7.2-STABLE FreeBSD 7.2-STABLE #0:
> Sat Jul 25 05:39:55 EDT 2009
> 
> imb at aaron:/home/imb> jls
>    JID  IP Address      Hostname                      Path
> 
>  [ .. ]
> 
>      5  202.12.127.68   db.protected-networks.net
> 		/usr/local/jails/db.protected-networks.net
> 
> imb at aaron:/home/imb> sudo jexec 5 tcsh
> jexec: Unable to parse jail ID.: No such file or directory
> 
> Huh?
> 
> 	imb


The symptom in jexec can be fixed by this little patch:

Index: usr.sbin/jexec/jexec.c
===================================================================
--- usr.sbin/jexec/jexec.c	(revision 195879)
+++ usr.sbin/jexec/jexec.c	(working copy)
@@ -248,6 +248,7 @@
  	if (argc < 2)
  		usage();
  	if (strlen(argv[0]) > 0) {
+		errno = 0;
  		jid = (int)strtol(argv[0], NULL, 10);
  		if (errno)
  			err(1, "Unable to parse jail ID.");

But the broader problem is malloc.  It's leaving errno set to
ENOENT when /etc/malloc.conf doesn't exist.  This seems like
wrong behavior to me.

- Jamie


More information about the freebsd-stable mailing list