Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Feb 2013 00:40:31 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: bindat(2) and connectat(2) syscalls for review.
Message-ID:  <20130213234030.GD1375@garage.freebsd.pl>
In-Reply-To: <20130213232004.GA2522@kib.kiev.ua>
References:  <20130213230354.GC1375@garage.freebsd.pl> <20130213232004.GA2522@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

--/3yNEOqWowh/8j+e
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Feb 14, 2013 at 01:20:04AM +0200, Konstantin Belousov wrote:
> On Thu, Feb 14, 2013 at 12:03:54AM +0100, Pawel Jakub Dawidek wrote:
> > Hi.
> >=20
> > I'd like to commit the following patch:
> >=20
> > 	http://people.freebsd.org/~pjd/patches/bindconnectat.patch
> >=20
> > It implements bindat(2) and connectat(2) syscalls that will allow to
> > manage UNIX domain sockets from within capability mode sandbox.
> >=20
> > They work just like any other *at(2) syscall and their prototypes look
> > like this:
> >=20
> > 	int bindat(int fd, int s, const struct sockaddr *addr, socklen_t addrl=
en);
> > 	int connectat(int fd, int s, const struct sockaddr *addr, socklen_t ad=
drlen);
> >=20
> > Where 'fd' is directory descriptor. The only supported socket domain is
> > PF_LOCAL.
> >=20
> > The audit subsystem was updated to audit the new syscalls properly.
> >=20
> > Comments and reviews are welcome.
>=20
> Looking only at prototypes, I think it is useful to add at last the flags
> argument.  The first application of it is for O_CLOEXEC-like flag.

And this flag should be applied to?

Note that those syscalls don't create new descriptors, they operate on
existing descriptors (directory descriptor and socket descriptor) that
should eventually have close-on-exec flag set if required.

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl

--/3yNEOqWowh/8j+e
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAlEcJG4ACgkQForvXbEpPzQyfgCeIsO0CRxOQlzOOdpTDzqSjAoS
gRkAoMSqLiVrRHpFHmcGLbYq46MSBi01
=XHDm
-----END PGP SIGNATURE-----

--/3yNEOqWowh/8j+e--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130213234030.GD1375>