there should be intermediate shell to satisfy the policy
Created attachment 2030 [details] patch solving the problem
Surely you can just change the policy? Using a shell means that we will have to audit the environment that it runs in; executing directly provides fewer opportunities for attack.
Created attachment 2034 [details] The new patch Another possibility how to solve the selinux problem.
So, you still haven't answered my question from comment #2. Also, why is the fork() necessary? Can't you just do setexeccon(NULL) before the execl()?
You are true, in this consideration setexeccon(NULL) is enough.
Created attachment 2039 [details] /tmp/pwchange-selinux.diff setexeccon() before exec()
So attachment #2039 [details] is sufficient?
yes, it is OK
patch applied - thanks
close resolved bugs now that openssh-5.9 has been released