dnotify doesn't deliver signals when user changes
Mark Weaver
mark at npsl.co.uk
Fri Mar 18 18:50:47 GMT 2005
> Does anyone know if this is a problem with dnotify, samba, or both or
> could suggest a reasonable workaround?
>
I did some more digging, the kernel code is not very complicated here:
static void send_sigio_to_task(struct task_struct *p,
struct fown_struct *fown,
int fd,
int reason)
{
if ((fown->euid != 0) &&
(fown->euid ^ p->suid) && (fown->euid ^ p->uid) &&
(fown->uid ^ p->suid) && (fown->uid ^ p->uid))
return;
Basically if any of uid/euid isn't the same as the task's uid/suid, and
the file wasn't opened as root, then signals don't get delivered.
I would assume therefore that this is a samba problem.
I hacked around it by shoving a becomme_root/unbecome_root in
kernel_register_notify but I'm sure that's not correct as it has
security implications.
For my purposes, it doesn't matter, but it seems that this is a general
bug in samba.
Any suggestions on a better fix?
Thanks,
Mark
More information about the samba-technical
mailing list