Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/newfs_udf Fix endian bug in permission storage



details:   https://anonhg.NetBSD.org/src/rev/73c2989c7bcf
branches:  trunk
changeset: 365811:73c2989c7bcf
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Tue Apr 26 14:54:40 2022 +0000

description:
Fix endian bug in permission storage

diffstat:

 sbin/newfs_udf/udf_core.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 46031e362c66 -r 73c2989c7bcf sbin/newfs_udf/udf_core.c
--- a/sbin/newfs_udf/udf_core.c Tue Apr 26 13:40:15 2022 +0000
+++ b/sbin/newfs_udf/udf_core.c Tue Apr 26 14:54:40 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_core.c,v 1.6 2022/04/26 13:40:15 reinoud Exp $ */
+/* $NetBSD: udf_core.c,v 1.7 2022/04/26 14:54:40 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008, 2021, 2022 Reinoud Zandijk
@@ -30,7 +30,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: udf_core.c,v 1.6 2022/04/26 13:40:15 reinoud Exp $");
+__RCSID("$NetBSD: udf_core.c,v 1.7 2022/04/26 14:54:40 reinoud Exp $");
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -2466,7 +2466,7 @@
                fe->uid  = udf_rw32(st->st_uid);
                fe->gid  = udf_rw32(st->st_gid);
 
-               fe->perm = unix_mode_to_udf_perm(st->st_mode);
+               fe->perm = udf_rw32(unix_mode_to_udf_perm(st->st_mode));
 
                icbflags = udf_rw16(fe->icbtag.flags);
                icbflags &= ~UDF_ICB_TAG_FLAGS_SETUID;
@@ -2566,7 +2566,7 @@
                efe->uid = udf_rw32(st->st_uid);
                efe->gid = udf_rw32(st->st_gid);
 
-               efe->perm = unix_mode_to_udf_perm(st->st_mode);
+               efe->perm = udf_rw32(unix_mode_to_udf_perm(st->st_mode));
 
                icbflags = udf_rw16(efe->icbtag.flags);
                icbflags &= ~UDF_ICB_TAG_FLAGS_SETUID;



Home | Main Index | Thread Index | Old Index