samba not responding to linux __break_lease() call.

Robert Rappaport robert.rappaport at gmail.com
Mon Jun 25 21:50:37 GMT 2007


A couple of weeks ago I posted a message with the above subject to the samba
general interest list and I received a response from Volker Lendecke.  We
subsequently interchanged several mail messages on this subject.  I now have
some more evidence about my problem and I would like to know if anyone can
help.

Basically I see the foolwoing sequence of calls:

  First  __break_lease() is called and it then calls:

      lease_break_callback() => kill_fasync() => __kill_fasync() =>
send_sigio() => send_sigio_to_task() => sigio_perm()

This is where it fails because sigio_perm() is called in
send_sigio_to_task() with the following lines of code:

        if (!sigio_perm(p, fown, fown->signum))
                return;

And I am seeing an early return from send_sigio_to_task() with ever having
called the following sequence:

       group_send_sig_info() => __group_send_sig_info() => send_signal()

Because send_signal() is not being called the signal is not delivered to the
smbd task and the lease is not being released.

Routine, sigio_perm() is very simple:

static inline int sigio_perm(struct task_struct *p,
                             struct fown_struct *fown, int sig)
{
        return (((fown->euid == 0) ||
                 (fown->euid == p->suid) || (fown->euid == p->uid) ||
                 (fown->uid == p->suid) || (fown->uid == p->uid)) &&
                !security_file_send_sigiotask(p, fown, sig));
}

and the problem I see is that it is returning the value zero because:

           fown->euid is 500
           fown-> uid  is 500
           p->uid        is 0
           p->suid      is 0

where p is a pointer to the task_stuct of the smbd task.

It appears to me that the euid and the uid of the file owner being 500 is
probably correct in that that should reflect the properties of the PC client
for whom samba has opened the file.  But I am not sure what the smbd task
should have in its task_struct and if the values I see represent an error.

I am running samba-3.0.24-3.fc6 on linux 2.6.19.5.

I have observed this behavior when running with my own file system and also
with an ext3 file system served to a PC client.

I would be grateful for any help in resolving this.

- Robert Rappaport


More information about the samba-technical mailing list