* [PATCH] mkfs.ubifs: Fix build with SELinux
@ 2020-09-22 21:14 Bastian Germann
2020-09-29 12:19 ` David Oberhollenzer
0 siblings, 1 reply; 2+ messages in thread
From: Bastian Germann @ 2020-09-22 21:14 UTC (permalink / raw)
To: linux-mtd; +Cc: Bastian Germann
In v2.1.0, SELinux support was introduced. It never compiled with ubifs
because it uses the old add_xattr signature that also changed in v2.1.0
with a1bd316e23("mkfs.ubifs: Implement fscrypto context store as xattr").
Add the ubifs_ino_node and name to the call and remove the nm that is
contructed in the new function version.
Signed-off-by: Bastian Germann <bastiangermann@fishpost.de>
---
ubifs-utils/mkfs.ubifs/mkfs.ubifs.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
index cd66d93..8211ada 100644
--- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
+++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
@@ -1411,7 +1411,6 @@ static int inode_add_selinux_xattr(struct ubifs_ino_node *host_ino,
int ret;
char *sepath = NULL;
char *name;
- struct qstr nm;
unsigned int con_size;
if (!context || !sehnd) {
@@ -1442,14 +1441,7 @@ static int inode_add_selinux_xattr(struct ubifs_ino_node *host_ino,
con_size = strlen(secontext) + 1;
name = strdup(XATTR_NAME_SELINUX);
- nm.name = name;
- nm.len = strlen(name);
- host_ino->xattr_cnt++;
- host_ino->xattr_size += CALC_DENT_SIZE(nm.len);
- host_ino->xattr_size += CALC_XATTR_BYTES(con_size);
- host_ino->xattr_names += nm.len;
-
- ret = add_xattr(st, inum, secontext, con_size, &nm);
+ ret = add_xattr(host_ino, st, inum, name, secontext, con_size);
if (ret < 0)
dbg_msg(2, "add_xattr failed %d\n", ret);
return ret;
--
2.28.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mkfs.ubifs: Fix build with SELinux
2020-09-22 21:14 [PATCH] mkfs.ubifs: Fix build with SELinux Bastian Germann
@ 2020-09-29 12:19 ` David Oberhollenzer
0 siblings, 0 replies; 2+ messages in thread
From: David Oberhollenzer @ 2020-09-29 12:19 UTC (permalink / raw)
To: Bastian Germann, linux-mtd
Applied to mtd-utils.git master.
Thanks,
David
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-29 12:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 21:14 [PATCH] mkfs.ubifs: Fix build with SELinux Bastian Germann
2020-09-29 12:19 ` David Oberhollenzer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.