ALT Linux Bugzilla
– Attachment 7688 Details for
Bug 35210
Не видит пользователей в /etc/tcb при составлении списка
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Use getspent_r() instead of fgetspent_r() (TCB)
0001-Use-getspent_r-instead-of-fgetspent_r-TCB.patch (text/plain), 1.91 KB, created by
Fr. Br. George
on 2018-08-04 19:44:37 MSK
(
hide
)
Description:
Use getspent_r() instead of fgetspent_r() (TCB)
Filename:
MIME Type:
Creator:
Fr. Br. George
Created:
2018-08-04 19:44:37 MSK
Size:
1.91 KB
patch
obsolete
>From 378616176d2de44075eef06043c4a12ea491a398 Mon Sep 17 00:00:00 2001 >From: "George V. Kouryachy (Fr. Br. George)" <george@altlinux.ru> >Date: Sat, 4 Aug 2018 19:14:46 +0300 >Subject: [PATCH] Use getspent_r() instead of fgetspent_r() (TCB) > >--- > src/daemon.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/src/daemon.c b/src/daemon.c >index e711a46..028de77 100644 >--- a/src/daemon.c >+++ b/src/daemon.c >@@ -179,11 +179,13 @@ entry_generator_fgetpwent (Daemon *daemon, > FILE *fp; > struct spwd *shadow_entry; > >+ /* > fp = fopen (PATH_SHADOW, "r"); > if (fp == NULL) { > g_warning ("Unable to open %s: %s", PATH_SHADOW, g_strerror (errno)); > return NULL; > } >+ */ > > shadow_users = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); > >@@ -192,7 +194,7 @@ entry_generator_fgetpwent (Daemon *daemon, > > shadow_entry_buffers = g_malloc0 (sizeof (*shadow_entry_buffers)); > >- ret = fgetspent_r (fp, &shadow_entry_buffers->spbuf, shadow_entry_buffers->buf, sizeof (shadow_entry_buffers->buf), &shadow_entry); >+ ret = getspent_r (&shadow_entry_buffers->spbuf, shadow_entry_buffers->buf, sizeof (shadow_entry_buffers->buf), &shadow_entry); > if (ret == 0) { > g_hash_table_insert (shadow_users, g_strdup (shadow_entry->sp_namp), shadow_entry_buffers); > } else { >@@ -204,7 +206,7 @@ entry_generator_fgetpwent (Daemon *daemon, > } > } while (shadow_entry != NULL); > >- fclose (fp); >+ //fclose (fp); > > if (g_hash_table_size (shadow_users) == 0) { > g_clear_pointer (&shadow_users, g_hash_table_unref); >-- >2.10.5 >
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 35210
:
7688
|
7708