80 lines
2.7 KiB
Diff
80 lines
2.7 KiB
Diff
--- a/autotests/kacltest.cpp 2024-02-21 12:25:36.000000000 +0100
|
|
+++ - 2024-03-02 20:04:25.695983576 +0100
|
|
@@ -34,7 +34,7 @@
|
|
|
|
m_testACL = QStringLiteral(
|
|
"user::rw-\n"
|
|
- "user:bin:rwx\n"
|
|
+ "user:nobody:rwx\n"
|
|
"group::rw-\n"
|
|
"mask::rwx\n"
|
|
"other::r--\n");
|
|
@@ -64,7 +64,7 @@
|
|
m_testACL2 =
|
|
QLatin1String{
|
|
"user::rwx\n"
|
|
- "user:bin:rwx\n"
|
|
+ "user:nobody:rwx\n"
|
|
"group::rw-\n"}
|
|
+ orderedGroups
|
|
+ QLatin1String{
|
|
@@ -74,7 +74,7 @@
|
|
m_testACLEffective =
|
|
QLatin1String{
|
|
"user::rwx\n"
|
|
- "user:bin:rwx #effective:r-x\n"
|
|
+ "user:nobody:rwx #effective:r-x\n"
|
|
"group::rw- #effective:r--\n"}
|
|
+ orderedGroups
|
|
+ QLatin1String{
|
|
@@ -131,7 +131,7 @@
|
|
++count;
|
|
}
|
|
QCOMPARE(count, 1);
|
|
- QCOMPARE(name, QStringLiteral("bin"));
|
|
+ QCOMPARE(name, QStringLiteral("nobody"));
|
|
QCOMPARE(permissions, 7);
|
|
}
|
|
|
|
@@ -205,19 +205,19 @@
|
|
bool dummy = false;
|
|
QCOMPARE(int(CharlesII.maskPermissions(dummy)), 7);
|
|
|
|
- const QString expected(QStringLiteral("user::rw-\nuser:root:rwx\nuser:bin:r--\ngroup::rw-\nmask::rwx\nother::r--\n"));
|
|
+ const QString expected(QStringLiteral("user::rw-\nuser:root:rwx\nuser:nobody:r--\ngroup::rw-\nmask::rwx\nother::r--\n"));
|
|
|
|
ACLUserPermissionsList users;
|
|
ACLUserPermissions user = qMakePair(QStringLiteral("root"), (unsigned short)7);
|
|
users.append(user);
|
|
- user = qMakePair(QStringLiteral("bin"), (unsigned short)4);
|
|
+ user = qMakePair(QStringLiteral("nobody"), (unsigned short)4);
|
|
users.append(user);
|
|
CharlesII.setAllUserPermissions(users);
|
|
QCOMPARE(CharlesII.asString(), expected);
|
|
|
|
CharlesII.setACL(m_testACL); // reset
|
|
// it already has an entry for bin, let's change it
|
|
- CharlesII.setNamedUserPermissions(QStringLiteral("bin"), 4);
|
|
+ CharlesII.setNamedUserPermissions(QStringLiteral("nobody"), 4);
|
|
CharlesII.setNamedUserPermissions(QStringLiteral("root"), 7);
|
|
QCOMPARE(CharlesII.asString(), expected);
|
|
|
|
@@ -237,7 +237,7 @@
|
|
const QString expected2 =
|
|
QLatin1String{
|
|
"user::rw-\n"
|
|
- "user:bin:rwx\n"
|
|
+ "user:nobody:rwx\n"
|
|
"group::rw-\n"}
|
|
+ orderedGroups
|
|
+ QLatin1String{
|
|
@@ -267,7 +267,7 @@
|
|
v = foo.setNamedGroupPermissions(QStringLiteral("jongel"), 7); // non-existing group
|
|
QVERIFY(!v);
|
|
|
|
- v = foo.setNamedUserPermissions(QStringLiteral("bin"), 7); // existing user
|
|
+ v = foo.setNamedUserPermissions(QStringLiteral("nobody"), 7); // existing user
|
|
QVERIFY(v);
|
|
v = foo.setNamedUserPermissions(QStringLiteral("jongel"), 7); // non-existing user
|
|
QVERIFY(!v);
|