pwrap: Fix a possible timing issue in p_copy()
authorAndreas Schneider <asn@samba.org>
Fri, 15 Jan 2016 14:20:24 +0000 (15:20 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 18 Jan 2016 10:06:29 +0000 (11:06 +0100)
commit3b1d585468c7fbd6402f75e27096a19f3620b940
treea1056a5a8f901cf36301dd8e60ef280a7410f4fc
parentc91b2033bebe69ff5bab67c8db960ac5ec021268
pwrap: Fix a possible timing issue in p_copy()

Do not rely on stat before open - it is racy.
Open directly and treat failure appropriately.

CID: 47518

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
src/pam_wrapper.c