regression with jexec?
Kostik Belousov
kostikbel at gmail.com
Sun Jul 26 12:06:26 UTC 2009
On Sat, Jul 25, 2009 at 09:06:34PM -0400, Michael Butler wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jamie Gritton wrote:
> > Michael Butler wrote:
> >> imb at aaron:/home/imb> sudo jexec 5 tcsh
> >> jexec: Unable to parse jail ID.: No such file or directory
>
> >
> > 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.");
>
> Thanks - this certainly cures the effect.
>
> > 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.
>
> Seems like a POLA violation to me,
No, this is how errno generally work, it is not changed if no error
happens.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20090726/5987c343/attachment.pgp
More information about the freebsd-stable
mailing list