[Solved] Question about building shadow package on Debian

Need help with C, C++, perl, python, etc?

Re: Question about building shadow package on Debian

Postby stevepusser » 2021-01-05 23:58

Why can't you paste the build output showing what's going with the patches, then? Like I can?
MX Linux packager and developer
User avatar
stevepusser
 
Posts: 12182
Joined: 2009-10-06 05:53

Re: Question about building shadow package on Debian

Postby p_linux » 2021-01-06 21:04

Hi,

I think I found the solution.

I didn't think of using "strings" to check the contents of the binary, I validated or not the good functioning of my binary with "strace".
This allowed me to see that my modified string (/etc/test/passwd) was present in the binary compiled.

I also noticed that the binary compiled "by hand" didn't load the PAM module during the build unlike the build done with "debuild".
After some research, I saw that these same absolute paths (/etc/{passwd, shadow}) are also present in the shared libraries of the libpam-modules package :

Code: Select all
$ strings /lib/x86_64-linux-gnu/security/pam_* | grep "shadow\|passwd"

I think that's why the hand-compiled binary works, because it doesn't use the paths present in the shared libraries.
The "strace" of the binary made with debuild always returns the old paths (/etc/{passwd, shadow}) because they are overloaded by the PAM module.

The solution is to also recompile the libpam-modules package, but it's a complex solution because the modifications are not easiest (code + dependencies).

Thanks for your help.
P.
p_linux
 
Posts: 9
Joined: 2020-12-31 12:52

Previous

Return to Programming

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable