[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: clamav failure on hurd-i386
From: |
Samuel Thibault |
Subject: |
Re: clamav failure on hurd-i386 |
Date: |
Sun, 24 Aug 2014 23:11:49 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Samuel Thibault, le Sun 24 Aug 2014 22:06:42 +0200, a écrit :
> Samuel Thibault, le Sun 24 Aug 2014 21:29:57 +0200, a écrit :
> > On the technical side, what fails is the __ifsock_getsockaddr call.
> > Indeed, since the node is created as 0000, the ifsock translators
> > tells glibc that it doesn't have any right. The port to the translator
> > was gotten through a __file_name_lookup_under. Isn't there a way to
> > get a port to the translator directly from the node port on which the
> > translator is running, instead of looking up the name?
>
> dir_lookup(node, "", ...) seems to be doing it indeed. The it's a matter
> of ifsock accepting __ifsock_getsockaddr when it's opened with O_READ
> too.
Mmm, no, that doesn't work. My idea was to do this from glibc:
bind() {
...
dir_mkfile(dir, O_CREAT, 0666, &node);
file_set_translator(node, ...)
dir_lookup(node, "", O_RDWR, 0, ..., &ifsock);
file_chmod(node, 0666 & ~_hurd_umask);
dir_link(dir, node, name, 1);
ifsock_getsockaddr(ifsock, &aport);
...
}
The idea being to let perm 0666 while calling dir_lookup, and clearing
those permissions before making the node show up in the FS.
But libdiskfs/dir-lookup.c has a clear:
if (((type == S_IFSOCK || ...)
&& (flags & (O_READ|O_WRITE|O_EXEC)))
|| ...)
error = EACCES;
i.e. we're not allowed to have openstat != 0 for the ifsock node,
basically.
Roland, any idea of another way to create local sockets with umask 777?
Samuel
- Re: clamav failure on hurd-i386, Samuel Thibault, 2014/08/24
- Re: clamav failure on hurd-i386, Samuel Thibault, 2014/08/24
- Re: clamav failure on hurd-i386,
Samuel Thibault <=
- Re: clamav failure on hurd-i386, Samuel Thibault, 2014/08/25
- [PATCH,Hurd] bind() fails when umask is 0000, Samuel Thibault, 2014/08/25
- Re: [PATCH,Hurd] bind() fails when umask is 0000, Roland McGrath, 2014/08/26
- Re: [PATCH,Hurd] bind() fails when umask is 0777, Samuel Thibault, 2014/08/27
- Re: [PATCH,Hurd] bind() fails when umask is 0777, Roland McGrath, 2014/08/27
- Re: [PATCH,Hurd] bind() fails when umask is 0777, Samuel Thibault, 2014/08/27
- Re: [PATCH,Hurd] bind() fails when umask is 0777, Roland McGrath, 2014/08/27