xfs
[Top] [All Lists]

bug in dmapi ?

To: linux-xfs@xxxxxxxxxxx
Subject: bug in dmapi ?
From: Eugene Exarevsky <zheka@xxxxxxxx>
Date: 12 Jan 2001 15:33:28 +0300
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi!

Here is some results of my playing with XFS DMAPI:

1. libdm can't be compiled without inserting

#define  _LOOSE_KERNEL_NAMES
#include <linux/types.h>

before 

#include <linux/dmapi_kern.h>

Maybe, insert this lines into dmapi_kern.h ?

2.
After non-priveleged user called dmapi function that calls 
dm_query_fsys_for_vector()
(invisible read, for example), vector leaved initialized by dm_enosys() 
function until reboot.
So even root will give ENOSYS.

Possible solution is to not check for CAP_MKNOD when getting operations vector.

xfs_dmapi.c:xfs_dm_fcntl() begin may looks like :
        dmfcntlp = (dm_fcntl_t *)arg;

#ifdef __sgi
        if (!cap_able_cred(credp, CAP_DEVICE_MGT))
                return(EPERM);
#else
        if (dmfcntlp->dmfc_subfunc != DM_FCNTL_FSYSVECTOR && 
!capable(CAP_MKNOD))
                return(EPERM);
#endif


Sorry for my English.

-- 
E.Exarevsky

<Prev in Thread] Current Thread [Next in Thread>