[Solved] Question about building shadow package on Debian

Programming languages, Coding, executables, and scripting.
Post Reply
Message
Author
User avatar
stevepusser
Posts: 12430
Joined: 2009-10-06 05:53
Has thanked: 8 times
Been thanked: 6 times

Re: Question about building shadow package on Debian

#16 Post by stevepusser »

Why can't you paste the build output showing what's going with the patches, then? Like I can?
MX Linux packager and developer

p_linux
Posts: 9
Joined: 2020-12-31 12:52

Re: Question about building shadow package on Debian

#17 Post by p_linux »

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.

Post Reply