ENTRY;
if(fsfilt->fs_get_md(inode, id, sizeof(*id), EA_SID) <= 0)
RETURN(-ENODATA);
+
RETURN(0);
}
-
+#if 0
static int audit_ost_create_rec(struct inode * parent, void * arg,
struct audit_priv * priv, char * buffer,
__u32 * type)
return len;
}
-
+#endif
int static audit_ost_rw_rec(struct inode * inode, void * arg,
struct audit_priv * priv, char * buffer,
__u32 * type)
struct audit_record * rec = (void*)buffer;
char * pbuf = buffer + sizeof(*rec);
int len = sizeof(*rec);
+ struct lustre_id id;
+
+ if (audit_ost_get_id(inode, &id) < 0)
+ CERROR("Cannot get lustre id from object EA\n");
rec->opcode = msg->write ? AUDIT_WRITE : AUDIT_READ;
- len += audit_rec_from_id(&pbuf, msg->id);
+ len += audit_rec_from_id(&pbuf, &id);
*type = SMFS_AUDIT_GEN_REC;
return len;
static audit_get_op audit_ost_record[HOOK_MAX] = {
[HOOK_SI_READ] audit_ost_rw_rec,
[HOOK_SI_WRITE] audit_ost_rw_rec,
+ [HOOK_READ] audit_ost_rw_rec,
+ [HOOK_WRITE] audit_ost_rw_rec,
[HOOK_CREATE] NULL, /* audit_ost_create_rec, */
- [HOOK_UNLINK] audit_ost_unlink_rec,
- [HOOK_SETATTR] audit_ost_setattr_rec,
- [HOOK_F_SETATTR] audit_ost_setattr_rec
+ [HOOK_UNLINK] NULL, //audit_ost_unlink_rec,
+ [HOOK_SETATTR] NULL, //audit_ost_setattr_rec,
+ [HOOK_F_SETATTR] NULL, //audit_ost_setattr_rec
};
int audit_ost_setup(struct obd_device * obd, struct super_block *sb,