On St, 2016-05-25 at 13:02 -0700, Charles Stephens wrote:
Your patch doesn't actually fix the problem. It still sets
PAM_USER
as the value of users= . lookup() merely determines if PAM_USER is
on the list of anonymous users, either specified in the users=
argument or the default list ("ftp" or "anonymous"). All your patch
does is create superfluous copies of either the list of specified
users (which causes the original failure) or one of the pre-canned
anonymous users. Neither is needed because pam_set_item copies
strings for you.
A truly complete fix would drop the third argument to lookup() and
also remove the stanza that calls pam_set_item(pamh, PAM_USER... but
I was going for the lease risky change.
No, not really. See the manual page of strtok_r() for how it works.
And see the manual page of pam_ftp on what the PAM_USER should be set
to after the pam_ftp processing is done if the user is anonymous.
My patch is correct.
Regards,
--
Tomas Mraz
No matter how far down the wrong road you've gone, turn back.
Turkish proverb
(You'll never know whether the road is wrong though.)