mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
Handle 64bits inode numbers.
Tetsuo Handa (1): tomoyo: use u64 for holding inode->i_ino value security/tomoyo/audit.c | 10 ++++------ security/tomoyo/common.h | 2 +- security/tomoyo/condition.c | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) -----BEGIN PGP SIGNATURE----- iQJXBAABCABBFiEEQ8gzaWI9etOpbC/HQl8SjQxk9SoFAmnoycAjHHBlbmd1aW4t a2VybmVsQGktbG92ZS5zYWt1cmEubmUuanAACgkQQl8SjQxk9Spv7Q/9HMitrl3P 2rcoisyZMcCuDshASwWF6Bxw0iIokWqg9gclalRHNUKyZ96KI+uuv0TNO8ROkdwl WqesL82ZGpB1Sz3TO7n/lwZynl1HnJdCF98LQpbvdxS8zQSfyERTnJxxc6QbvPgb rLmxjy1ugKcGdjqZN8k9KSOG7OKoS3+SIYghJ3TThjJ0SBRXKzE/PYvOPm6Ya/Jp DvUBUXyhDfTrXSrMOCqXORQG8sWsGOhvmoV+6S/AAQXzEuyDAE7zFN0+ae0jxFH0 dDixByH7QI87xdztTN312nUt5kjTosw/+v4y3q9+AH2wuchvyG7rnMUaRcPHTPLZ +ri5EGxB7cfMYN9YB5XIHFhpTbIlM+XTCk+gmB/ATw8LzjM3FykJEtwmmPZfB/YJ AzNP/yhF6ee3X/6oUKmyNzmUuz4cJSA8qDxdMZm5O0R8593AlX7URmuXzvmmjYRu kyrXQ9DFiV4ai1RuNvhm7drHah3BArobH35Vt2ghOB2zO5vohnwyfSFbrMsRr+Hd k4Gk23EuBjbw5YD/IfHpvwIcaRkAu/PhB3lIRoXUm8lTRSAqil4szqRpoKtf45WN LcvrryWoAapm9m1gw7nuWaRZO1mCyNdBFoBgsowBYNTnPLFrk76HHFSivmkTYHpx UPqNGqquBJkuwfKwKqe5cpn/eKWFRn6r9+o= =kPdF -----END PGP SIGNATURE----- Merge tag 'tomoyo-pr-20260422' of git://git.code.sf.net/p/tomoyo/tomoyo Pull tomoyo update from Tetsuo Handa: "Handle 64-bit inode numbers" * tag 'tomoyo-pr-20260422' of git://git.code.sf.net/p/tomoyo/tomoyo: tomoyo: use u64 for holding inode->i_ino value
This commit is contained in:
commit
87d03777eb
|
|
@ -195,21 +195,19 @@ static char *tomoyo_print_header(struct tomoyo_request_info *r)
|
|||
if (i & 1) {
|
||||
pos += snprintf(buffer + pos,
|
||||
tomoyo_buffer_len - 1 - pos,
|
||||
" path%u.parent={ uid=%u gid=%u ino=%lu perm=0%o }",
|
||||
" path%u.parent={ uid=%u gid=%u ino=%llu perm=0%o }",
|
||||
(i >> 1) + 1,
|
||||
from_kuid(&init_user_ns, stat->uid),
|
||||
from_kgid(&init_user_ns, stat->gid),
|
||||
(unsigned long)stat->ino,
|
||||
stat->mode & S_IALLUGO);
|
||||
stat->ino, stat->mode & S_IALLUGO);
|
||||
continue;
|
||||
}
|
||||
pos += snprintf(buffer + pos, tomoyo_buffer_len - 1 - pos,
|
||||
" path%u={ uid=%u gid=%u ino=%lu major=%u minor=%u perm=0%o type=%s",
|
||||
" path%u={ uid=%u gid=%u ino=%llu major=%u minor=%u perm=0%o type=%s",
|
||||
(i >> 1) + 1,
|
||||
from_kuid(&init_user_ns, stat->uid),
|
||||
from_kgid(&init_user_ns, stat->gid),
|
||||
(unsigned long)stat->ino,
|
||||
MAJOR(dev), MINOR(dev),
|
||||
stat->ino, MAJOR(dev), MINOR(dev),
|
||||
mode & S_IALLUGO, tomoyo_filetype(mode));
|
||||
if (S_ISCHR(mode) || S_ISBLK(mode)) {
|
||||
dev = stat->rdev;
|
||||
|
|
|
|||
|
|
@ -567,7 +567,7 @@ struct tomoyo_address_group {
|
|||
struct tomoyo_mini_stat {
|
||||
kuid_t uid;
|
||||
kgid_t gid;
|
||||
ino_t ino;
|
||||
u64 ino;
|
||||
umode_t mode;
|
||||
dev_t dev;
|
||||
dev_t rdev;
|
||||
|
|
|
|||
|
|
@ -766,8 +766,8 @@ bool tomoyo_condition(struct tomoyo_request_info *r,
|
|||
const struct tomoyo_condition *cond)
|
||||
{
|
||||
u32 i;
|
||||
unsigned long min_v[2] = { 0, 0 };
|
||||
unsigned long max_v[2] = { 0, 0 };
|
||||
u64 min_v[2] = { 0, 0 };
|
||||
u64 max_v[2] = { 0, 0 };
|
||||
const struct tomoyo_condition_element *condp;
|
||||
const struct tomoyo_number_union *numbers_p;
|
||||
const struct tomoyo_name_union *names_p;
|
||||
|
|
@ -834,7 +834,7 @@ bool tomoyo_condition(struct tomoyo_request_info *r,
|
|||
/* Check numeric or bit-op expressions. */
|
||||
for (j = 0; j < 2; j++) {
|
||||
const u8 index = j ? right : left;
|
||||
unsigned long value = 0;
|
||||
u64 value = 0;
|
||||
|
||||
switch (index) {
|
||||
case TOMOYO_TASK_UID:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user