-/**
- * tomoyo_path_number_perm2 - Check permission for "create", "mkdir", "mkfifo", "mksock", "ioctl", "chmod", "chown", "chgrp".
- *
- * @r: Pointer to "strct tomoyo_request_info".
- * @filename: Filename to check.
- * @number: Number.
- *
- * Returns 0 on success, negative value otherwise.
- *
- * Caller holds tomoyo_read_lock().
- */
-static int tomoyo_path_number_perm2(struct tomoyo_request_info *r,
- const u8 type,
- const struct tomoyo_path_info *filename,
- const unsigned long number)
-{
- int error;
-
- if (!filename)
- return 0;
- r->param_type = TOMOYO_TYPE_PATH_NUMBER_ACL;
- r->param.path_number.operation = type;
- r->param.path_number.filename = filename;
- r->param.path_number.number = number;
- do {
- tomoyo_check_acl(r, tomoyo_check_path_number_acl);
- error = tomoyo_audit_path_number_log(r);
- } while (error == TOMOYO_RETRY_REQUEST);
- return error;
-}
-