Message type for VFS_CHECKPERMS
Change-Id: Ie97bb7362d108ebba268c719a6614fc2fe1392cf
This commit is contained in:
parent
a57fc8f683
commit
8830643ac3
4 changed files with 17 additions and 10 deletions
|
@ -232,11 +232,6 @@
|
|||
|
||||
#define NR_VFS_CALLS 49 /* highest number from base plus one */
|
||||
|
||||
/* Field names for the checkperms(2) call. */
|
||||
#define VFS_CHECKPERMS_ENDPT m2_i1 /* endpoint_t */
|
||||
#define VFS_CHECKPERMS_GRANT m2_i2 /* cp_grant_id_t */
|
||||
#define VFS_CHECKPERMS_COUNT m2_i3 /* size_t */
|
||||
|
||||
/* Field names for the copyfd(2) call. */
|
||||
#define VFS_COPYFD_ENDPT m1_i1 /* endpoint_t */
|
||||
#define VFS_COPYFD_FD m1_i2 /* int */
|
||||
|
|
|
@ -211,6 +211,15 @@ typedef struct {
|
|||
} mess_lc_vfs_umount;
|
||||
_ASSERT_MSG_SIZE(mess_lc_vfs_umount);
|
||||
|
||||
typedef struct {
|
||||
endpoint_t endpt;
|
||||
cp_grant_id_t grant;
|
||||
size_t count;
|
||||
|
||||
uint8_t padding[44];
|
||||
} mess_lsys_vfs_checkperms;
|
||||
_ASSERT_MSG_SIZE(mess_lsys_vfs_checkperms);
|
||||
|
||||
typedef struct {
|
||||
dev_t device;
|
||||
off_t seek_pos;
|
||||
|
@ -669,6 +678,8 @@ typedef struct {
|
|||
mess_lc_vfs_statvfs1 m_lc_vfs_statvfs1;
|
||||
mess_lc_vfs_umount m_lc_vfs_umount;
|
||||
|
||||
mess_lsys_vfs_checkperms m_lsys_vfs_checkperms;
|
||||
|
||||
mess_vfs_fs_breadwrite m_vfs_fs_breadwrite;
|
||||
mess_vfs_fs_chmod m_vfs_fs_chmod;
|
||||
mess_vfs_fs_chown m_vfs_fs_chown;
|
||||
|
|
|
@ -16,9 +16,9 @@ checkperms(endpoint_t endpt, char *path, size_t size)
|
|||
return ENOMEM;
|
||||
|
||||
memset(&m, 0, sizeof(m));
|
||||
m.VFS_CHECKPERMS_ENDPT = endpt;
|
||||
m.VFS_CHECKPERMS_GRANT = grant;
|
||||
m.VFS_CHECKPERMS_COUNT = size;
|
||||
m.m_lsys_vfs_checkperms.endpt = endpt;
|
||||
m.m_lsys_vfs_checkperms.grant = grant;
|
||||
m.m_lsys_vfs_checkperms.count = size;
|
||||
|
||||
r = _taskcall(VFS_PROC_NR, VFS_CHECKPERMS, &m);
|
||||
|
||||
|
|
|
@ -872,6 +872,7 @@ int do_checkperms(void)
|
|||
/* This should be replaced by an ACL check. */
|
||||
if (!super_user) return EPERM;
|
||||
|
||||
return check_perms(job_m_in.VFS_CHECKPERMS_ENDPT,
|
||||
job_m_in.VFS_CHECKPERMS_GRANT, (size_t) job_m_in.VFS_CHECKPERMS_COUNT);
|
||||
return check_perms(job_m_in.m_lsys_vfs_checkperms.endpt,
|
||||
job_m_in.m_lsys_vfs_checkperms.grant,
|
||||
job_m_in.m_lsys_vfs_checkperms.count);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue