[linux-pam] #46: Fix build with musl libc
by fedora-badges
#46: Fix build with musl libc
----------------------+------------------------------
Reporter: yousong | Owner: pam-developers@…
Type: defect | Status: new
Priority: major | Component: library
Version: | Keywords:
Blocked By: | Blocking:
----------------------+------------------------------
Hi, patch files in the attachments are produced when building libpam
within OpenWrt. Not long ago, OpenWrt switched to musl as the default
libc which is relatively and different from other implementations, e.g.
crypt() function is part of musl-libc itself, many old functions are
dropped from the implementation, etc.
--
Ticket URL: <https://fedorahosted.org/linux-pam/ticket/46>
linux-pam <http://fedorahosted.org/linux-pam>
The Linux-PAM (Pluggable Authentication Modules) project
8 years
[linux-pam] #45: Premature thread wake up on successful pam_authenticate call
by fedora-badges
#45: Premature thread wake up on successful pam_authenticate call
---------------------+------------------------------
Reporter: igleyy | Owner: pam-developers@…
Type: defect | Status: new
Priority: major | Component: library
Version: | Keywords:
Blocked By: | Blocking:
---------------------+------------------------------
For given example code, thread which should sleep for given period of time
is prematurely woken up upon successful pam_authenticate call.
Environment:[[BR]]
Linux Mint 16[[BR]]
libpamc.so.0.82.1[[BR]]
libpam_misc.so.0.82.0[[BR]]
libpam.so.0.83.0[[BR]]
g++ (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1[[BR]]
Code:
{{{
#include <security/pam_appl.h>
#include <security/pam_misc.h>
#include <pthread.h>
#include <iostream>
static struct pam_conv conv = {
misc_conv,
NULL
};
void* thread_func(void* foo) {
int i = 0;
std::cout << "Start thread func stuff " << i++ << std::endl;
while (1) {
std::cout << "Thread func stuff " << i++ << std::endl;
sleep(1000000);
}
}
int main ()
{
pthread_t th;
int th_ret;
th_ret = pthread_create( &th, NULL, thread_func, (void*) NULL);
if (th_ret) {
std::cout << "pthread_create failed: " << th_ret << std::endl;
exit(1);
}
pam_handle_t* pamh;
struct pam_conv pamc;
/* Set up the PAM conversation. */
pamc.conv = &misc_conv;
pamc.appdata_ptr = NULL;
/* Start a new authentication session. */
pam_start ("passwd", "myusername", &pamc, &pamh);
/* Authenticate the user. */
if (pam_authenticate (pamh, 0) != PAM_SUCCESS)
std::cout << "Authentication failed!" << std::endl;
else
std::cout << "Authentication OK" << std::endl;
/* All done. */
pam_end (pamh, 0);
while(1) {} /* Prevent application finish. */
return 0;
}
}}}
Compiled with
{{{
g++ -g pamexample.c -pthread -lpam -lpam_misc
}}}
For my local user and correct password I get following output:
{{{
./a.out
Start thread func stuff 0
Thread func stuff 1
Password:
Thread func stuff 2
Thread func stuff 3
Thread func stuff 4
Thread func stuff 5
Thread func stuff 6
Authentication OK
}}}
For unsuccessful pam_authenticate calls output is correct. Output for
given example is correct on SLES 11.3, Ubuntu 14.04. Please let me know if
you need more information.
--
Ticket URL: <https://fedorahosted.org/linux-pam/ticket/45>
linux-pam <http://fedorahosted.org/linux-pam>
The Linux-PAM (Pluggable Authentication Modules) project
8 years, 7 months
[linux-pam] #47: [PATCH] pam_timestamp: File descriptor leak
by fedora-badges
#47: [PATCH] pam_timestamp: File descriptor leak
-----------------------+------------------------------
Reporter: avalluri | Owner: pam-developers@…
Type: defect | Status: new
Priority: major | Component: modules
Version: 1.1.x | Keywords:
Blocked By: | Blocking:
-----------------------+------------------------------
I have attached a patch that fixes file descriptor leak in pam_timestamp
module(hmac_key_create).
This is my first patch to linux-pam, Please guide me if this is not the
way to submit the patch.
--
Ticket URL: <https://fedorahosted.org/linux-pam/ticket/47>
linux-pam <http://fedorahosted.org/linux-pam>
The Linux-PAM (Pluggable Authentication Modules) project
8 years, 8 months
Memory leaks in pam_modutil_getpw/gr family of functions
by Valluri, Amarnath
Hello pam-devels,
In library code, the dynamically allocated(realloc) memory returned by pam_modutil_getgrnam/pid() pma_modutil_getpwnam/uid() functions, ie., struct group*, struct passwd* respectively is never been freed, so it leaks the memory quiet many modules which uses these functions.
Can someone help me understanding this, if this is intentional or a bug?
Please ignore and point me to the link, if this was already discussed. I failed to find the mail-archives related to this.
Thanks,
Amarnath
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
8 years, 8 months