#8 DCR to davfs

closed
nobody
5
2006-06-01
2005-07-05
Anonymous
No

Submitter: anders@trudheim.com

I have a Feature Request / Design Change Request for
davfs. I have experimented with having $HOME on a davfs
and while a shell login worked, running X did not.
Would it be possible to get proper unix permissions and
file locking akin to that in ext2/3 in the future in
davfs? :-)

/Anders

Discussion

  • Werner Baumann
    Werner Baumann
    2005-10-08

    Logged In: YES
    user_id=1260327

    Hello Anders,

    due to security problems the file permissions are fixed to
    read/write-permission for the owner. This will be replaced
    by a proper handling of permissions ... some day.

    But I am not sure whether this is really the problem with X.
    Maybe it is just the fact, that X gets an error when it
    tries to change the file mode.

    You might try to change davfsd.c line 731:

    Replace

    case CODA_SETATTR:
    if (!dav_has_permission(&in_buf->ih)) {
    out_buf->oh.result = EPERM;
    break;
    }
    CMD_NOREP(setattr);
    DUMP(setattr);
    GET_VFID_name(setattr);
    DBG3
    (" try to set mode to %o, mdate to %lx and owner
    to %d: ",
    in_buf->coda_setattr.attr.va_mode,
    in_buf->coda_setattr.attr.va_mtime.tv_sec,
    in_buf->coda_setattr.attr.va_uid);
    /*2005-05-29, werner, security fix*/
    if ((in_buf->coda_setattr.attr.va_mode != (u_short) -1)
    || (in_buf->coda_setattr.attr.va_uid != -1)
    || (in_buf->coda_setattr.attr.va_gid != -1))
    /*dav_chmod( name,
    in_buf->coda_setattr.attr.va_mode );*/
    out_buf->oh.result = ENOTSUP;
    /* cannot change owner, group or dates ....... */
    break;

    by

    case CODA_SETATTR:
    if (!dav_has_permission(&in_buf->ih)) {
    out_buf->oh.result = EPERM;
    break;
    }
    CMD_NOREP(setattr);
    DUMP(setattr);
    GET_VFID_name(setattr);
    DBG3
    (" try to set mode to %o, mdate to %lx and owner
    to %d: ",
    in_buf->coda_setattr.attr.va_mode,
    in_buf->coda_setattr.attr.va_mtime.tv_sec,
    in_buf->coda_setattr.attr.va_uid);
    break;

    and run mak and make install.

    This does not change the permissions, but prevents returning
    an error.

    Please tell whether it works.

    Greetings
    Werner

     
  • Werner Baumann
    Werner Baumann
    2006-06-01

    • status: open --> closed