Compare commits

...

3 Commits

Author SHA1 Message Date
Beebles 6ff704512c initial potential fix, gotta test on device 2026-05-11 15:52:56 -06:00
Michael T. DeGuzis d31c2bf034 fix(toaster): Forward playSound prop to ProcessNotification info (#901)
Co-authored-by: Michael DeGuzis <deguzim@amazon.com>
2026-04-30 12:58:53 -04:00
Kirill Nikiforov b7a884f26f fix setuid/setgid when running rootless (#892) 2026-04-11 15:35:54 -07:00
3 changed files with 15 additions and 15 deletions
@@ -116,28 +116,26 @@ def get_username() -> str:
return _get_user()
def setgid(user : UserType = UserType.HOST_USER):
user_id = 0
if user == UserType.HOST_USER:
user_id = _get_user_group_id()
host_user_group_id, effective_user_group_id = _get_user_group_id(), _get_effective_user_group_id()
if host_user_group_id == effective_user_group_id:
pass
elif user == UserType.HOST_USER:
os.setgid(host_user_group_id)
elif user == UserType.EFFECTIVE_USER:
pass # we already are
os.setgid(effective_user_group_id)
else:
raise Exception("Unknown user type")
os.setgid(user_id)
def setuid(user : UserType = UserType.HOST_USER):
user_id = 0
if user == UserType.HOST_USER:
user_id = _get_user_id()
host_user_id, effective_user_id = _get_user_id(), _get_effective_user_id()
if host_user_id == effective_user_id:
pass
elif user == UserType.HOST_USER:
os.setuid(host_user_id)
elif user == UserType.EFFECTIVE_USER:
pass # we already are
os.setuid(effective_user_id)
else:
raise Exception("Unknown user type")
os.setuid(user_id)
async def service_active(service_name : str) -> bool:
res, _, _ = await run(["systemctl", "is-active", service_name], stdout=DEVNULL, stderr=DEVNULL)
+2 -1
View File
@@ -56,7 +56,8 @@ const PluginView: FC = () => {
<PanelSectionRow key={name}>
<ButtonItem layout="below" onClick={() => setActivePlugin(name)}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
{icon}
{/* @ts-expect-error - ErrorBoundary is given fallback in the patch in errorboundary-hook.tsx, but it's not typed */}
<ErrorBoundary fallback={<span></span>}>{icon}</ErrorBoundary>
<div>{name}</div>
<NotificationBadge show={updates?.has(name)} style={{ top: '-5px', right: '-5px' }} />
</div>
+1
View File
@@ -81,6 +81,7 @@ class Toaster extends Logger {
const info = {
showToast: toast.showToast,
sound: toast.sound,
playSound: toast.playSound,
eFeature: 0,
toastDurationMS: toastData.nToastDurationMS,
bCritical: toast.critical,