ALT Linux Bugzilla
– Attachment 18881 Details for
Bug 46389
phosh [tcb]: Не работает разблокровка экрана
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
updated_patch
phosh-0.48.0-alt-tcb-check.patch (text/plain), 1.08 KB, created by
Egor Shestakov
on 2025-06-24 11:12:01 MSK
(
hide
)
Description:
updated_patch
Filename:
MIME Type:
Creator:
Egor Shestakov
Created:
2025-06-24 11:12:01 MSK
Size:
1.08 KB
patch
obsolete
>diff --git a/src/auth.c b/src/auth.c >index 44236081..badf808d 100644 >--- a/src/auth.c >+++ b/src/auth.c >@@ -10,6 +10,7 @@ > > #include "phosh-config.h" > #include "auth.h" >+#include "grp.h" > > #include <security/pam_appl.h> > >@@ -69,6 +70,8 @@ authenticate (PhoshAuth *self, const char *authtok) > { > int ret; > gboolean authenticated = FALSE; >+ struct group *eff_group; >+ int real_gid, init_eff_gid, re; > const char *username; > const struct pam_conv conv = { > .conv = pam_conversation_cb, >@@ -84,7 +87,17 @@ authenticate (PhoshAuth *self, const char *authtok) > } > } > >+ /* setegid with group chkpwd to check passwords by pam_tcb */ >+ real_gid = getgid (); >+ eff_group = getgrnam ("chkpwd"); >+ if (eff_group != NULL) { >+ init_eff_gid = eff_group->gr_gid; >+ re = setegid (init_eff_gid); >+ if (re == -1) >+ g_warning("pam_authenticate setegid(%d) failed", init_eff_gid); >+ } > ret = pam_authenticate (self->pamh, 0); >+ setegid (real_gid); > if (ret != PAM_SUCCESS) { > if (ret != PAM_AUTH_ERR) > g_warning ("pam_authenticate error %s", pam_strerror (self->pamh, ret));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 46389
: 18881