anonymous@RULINUX.NET~# Last login: 2024-04-25 23:38:31
Регистрация Вход Новости | Разметка | Пользователи | Галерея | Форум | Статьи | Неподтвержденное | Трекер | Правила форума | F.A.Q. | Ссылки | Поиск
[#] [Добавить метку] [Редактировать]
Скрыть

polkit-0.94 без linux-pam

Вот, собираю тут систему. Столкнулся с тем, что в PolicyKit последних версий гвоздями прибито использование linux-pam, даже если указывать --with-authfw=none/shadow. Посидел, повырезал всё лишнее, и получился patch:

 http://pastebin.org/49344

Вся проблема в одном файле. Не знаю, может кому пригодится. Смотрел gentoo-шные ebuild-ы, там ничего такого не нашёл.

anonymous(*) (2009-10-29 23:18:00)

Midori/0.2.0 (X11; Linux i686; U; ru-ru) WebKit/531.2+

[Ответить на это сообщение]
[#] [Добавить метку] [Редактировать] Ответ на: polkit-0.94 без linux-pam от anonymous 2009-10-29 23:18:00
avatar
Скрыть

Re: polkit-0.94 без linux-pam

Попытаюсь и здесь запостить, правда, не уверен, что движок не запорет всё


diff -Naur polkit-0.94.orig/src/polkitagent/polkitagenthelper.c polkit-0.94/src/polkitagent/polkitagenthelper.c
--- polkit-0.94.orig/src/polkitagent/polkitagenthelper.c        2009-08-12 17:56:47.000000000 +0400
+++ polkit-0.94/src/polkitagent/polkitagenthelper.c     2009-10-29 22:33:11.029790780 +0300
@@ -27,7 +27,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <syslog.h>
+#ifdef HAVE_PAM
 #include <security/pam_appl.h>
+#endif
 
 #include <polkit/polkit.h>
 
@@ -56,7 +58,9 @@
 
 static gboolean send_dbus_message (const char *cookie, const char *user);
 
+#ifdef HAVE_PAM
 static int conversation_function (int n, const struct pam_message **msg, struct pam_response **resp, void *data);
+#endif
 
 int
 main (int argc, char *argv[])
@@ -64,12 +68,16 @@
   int rc;
   const char *user_to_auth;
   const char *cookie;
+#ifdef HAVE_PAM
   struct pam_conv pam_conversation;
   pam_handle_t *pam_h;
   const void *authed_user;
+#endif
 
   rc = 0;
+#ifdef HAVE_PAM
   pam_h = NULL;
+#endif
 
   /* clear the entire environment to avoid attacks using with libraries honoring environment variables */
   if (clearenv () != 0)
@@ -113,6 +121,7 @@
   fprintf (stderr, "polkit-agent-helper-1: user to auth is '%s'.\n", user_to_auth);
 #endif /* PAH_DEBUG */
 
+#ifdef HAVE_PAM
   pam_conversation.conv        = conversation_function;
   pam_conversation.appdata_ptr = NULL;
 
@@ -171,6 +180,7 @@
 #endif /* PAH_DEBUG */
 
   pam_end (pam_h, rc);
+#endif
 
 #ifdef PAH_DEBUG
   fprintf (stderr, "polkit-agent-helper-1: sending D-Bus message to PolicyKit daemon\n");
@@ -198,8 +208,10 @@
   return 0;
 
 error:
+#ifdef HAVE_PAM
   if (pam_h != NULL)
     pam_end (pam_h, rc);
+#endif
 
   fprintf (stdout, "FAILURE\n");
   fflush (stdout);
@@ -208,6 +220,7 @@
   return 1;
 }
 
+#ifdef HAVE_PAM
 static int
 conversation_function (int n, const struct pam_message **msg, struct pam_response **resp, void *data)
 {
@@ -288,6 +301,7 @@
   *resp = NULL;
   return PAM_CONV_ERR;
 }
+#endif
 
 static gboolean
 send_dbus_message (const char *cookie, const char *user)
 

anonymous(*)(2009-10-29 23:23:51)

Midori/0.2.0 (X11; Linux i686; U; ru-ru) WebKit/531.2+
[#] [Добавить метку] [Редактировать] Ответ на: polkit-0.94 без linux-pam от anonymous 2009-10-29 23:18:00
avatar
Скрыть

Re: polkit-0.94 без linux-pam

По-моему, расстрелять всю эту шайку с freedesktop.org будет слишком гуманно, нет?

Понапридумывали всякой хуйни, а потом ебись - вырезай её из системы каленым железом ...

geekkoo(*)(2009-10-30 14:54:23)

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070601 SeaMonkey/1.1.2
Этот тред читают 1 пользователь:
Анонимных: 1
Зарегистрированных: 0




(c) 2010-2020 LOR-NG Developers Group
Powered by TimeMachine

Valid HTML 4.01 Transitional Правильный CSS!