Repository navigation
New package: noctalia-greeter-1.7.0 - #63053
BlackScorp wants to merge 2 commits into
Conversation
|
A new version (v1.7.0) of Noctalia Greeter is now available. Compiling with this template (adding libjxl-devel and changing the version to 1.7.0) for
succeeded and I tested the package briefly for my own system. |
deedbb4 to
15ea9b6
Compare
|
@juandmcr thanks for the hint, i updated the PR |
|
from local testing, noctalia-greeter's passwordless sync doesn't work with Void due to diff --git a/src/tools/passwordless_sync_policy.cpp b/src/tools/passwordless_sync_policy.cpp
index bfffee7..ba588af 100644
--- a/src/tools/passwordless_sync_policy.cpp
+++ b/src/tools/passwordless_sync_policy.cpp
@@ -46,6 +46,10 @@ namespace greeter::passwordless_sync {
constexpr std::size_t kMaximumUsers = 256;
constexpr std::size_t kMaximumUserNameLength = 256;
constexpr std::size_t kMaximumPathLength = 4096;
+ const uid_t kPolkitdUid = [] {
+ if (const struct passwd* pw = ::getpwnam("polkitd")) return pw->pw_uid;
+ return static_cast<uid_t>(-1);
+ }();
class UniqueFd {
public:
@@ -212,8 +216,8 @@ namespace greeter::passwordless_sync {
if (::stat(current.c_str(), &state) != 0) {
return setErrnoError(std::string("failed to inspect ") + std::string(description) + " directory", errorOut);
}
- if (!S_ISDIR(state.st_mode) || state.st_uid != 0 || (state.st_mode & (S_IWGRP | S_IWOTH)) != 0) {
- errorOut = std::string(description) + " must use a root-owned, non-user-writable directory chain";
+ if (!S_ISDIR(state.st_mode) || (state.st_uid != 0 && state.st_uid != kPolkitdUid) || (state.st_mode & (S_IWGRP | S_IWOTH)) != 0) {
+ errorOut = std::string(description) + " must use a root-owned or polkitd-owned, non-user-writable directory chain";
return false;
}
if (current == current.root_path()) {
@@ -432,7 +436,7 @@ namespace greeter::passwordless_sync {
if (::fstat(directory.get(), &state) != 0) {
return setErrnoError("failed to inspect the Polkit rules directory", errorOut);
}
- if (!S_ISDIR(state.st_mode) || state.st_uid != 0 || (state.st_mode & (S_IWGRP | S_IWOTH)) != 0) {
+ if (!S_ISDIR(state.st_mode) || (state.st_uid != 0 && state.st_uid != kPolkitdUid) || (state.st_mode & (S_IWGRP | S_IWOTH)) != 0) {
errorOut = "the Polkit rules directory has unsafe ownership or permissions";
return false;
} |
2f54bc7 to
5e6d1ef
Compare
|
hi @Anidetrix thanks for pointing that out. i didnt use passwordless login. i added your patch but modified it slightly and squasched my pr. |
|
I made an even more surgical patch which only allows (and forces) diff --git a/src/tools/passwordless_sync_policy.cpp b/src/tools/passwordless_sync_policy.cpp
index bfffee7..91a5d7b 100644
--- a/src/tools/passwordless_sync_policy.cpp
+++ b/src/tools/passwordless_sync_policy.cpp
@@ -46,6 +46,10 @@ namespace greeter::passwordless_sync {
constexpr std::size_t kMaximumUsers = 256;
constexpr std::size_t kMaximumUserNameLength = 256;
constexpr std::size_t kMaximumPathLength = 4096;
+ const uid_t kPolkitdUid = [] {
+ if (const struct passwd* pw = ::getpwnam("polkitd")) return pw->pw_uid;
+ return static_cast<uid_t>(-1);
+ }();
class UniqueFd {
public:
@@ -420,7 +424,8 @@ namespace greeter::passwordless_sync {
+ ec.message();
return false;
}
- if (!validateTrustedDirectoryChain(canonical, "Polkit rules", errorOut)) {
+ const std::filesystem::path parent = canonical.parent_path();
+ if (!validateTrustedDirectoryChain(parent, "Polkit rules parent", errorOut)) {
return false;
}
@@ -432,7 +437,7 @@ namespace greeter::passwordless_sync {
if (::fstat(directory.get(), &state) != 0) {
return setErrnoError("failed to inspect the Polkit rules directory", errorOut);
}
- if (!S_ISDIR(state.st_mode) || state.st_uid != 0 || (state.st_mode & (S_IWGRP | S_IWOTH)) != 0) {
+ if (!S_ISDIR(state.st_mode) || state.st_uid != kPolkitdUid || (state.st_mode & (S_IWGRP | S_IWOTH)) != 0) {
errorOut = "the Polkit rules directory has unsafe ownership or permissions";
return false;
} |
|
checkdepends="mesa-dri dejavu-fonts-ttf"I'd also suggest an |
Co-authored-by: joshuakraemer <joshuakraemer@users.noreply.github.com> Co-authored-by: Anidetrix <Anidetrix@users.noreply.github.com>
87c61fc to
90b34a3
Compare
|
Thanks @Anidetrix @joshuakraemer updated PR |
Testing the changes
./xbps-src pkg noctalia-greetercompleted successfully. With-Q, eight tests passed, one was skipped because EGL was unavailable, and the headless compositor test failed in the build environment.New package
Local build testing
x86_64-glibc.Related: #62968