diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-08-26 16:50:24 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-08-26 16:50:24 +0000 |
commit | d4c685c711208f33e10766734013415a372e93e4 (patch) | |
tree | 70b310c158194327e0d0a6ad34743ad0e4c2fe8c /lib/libpam.c | |
parent | 061dfc6edd70967c15cf25e2472936b60b45d16d (diff) | |
download | netpbm-mirror-d4c685c711208f33e10766734013415a372e93e4.tar.gz netpbm-mirror-d4c685c711208f33e10766734013415a372e93e4.tar.xz netpbm-mirror-d4c685c711208f33e10766734013415a372e93e4.zip |
pm_accept_to_pamtuples: fix bug: fill in pam structure
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@24 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/libpam.c')
-rw-r--r-- | lib/libpam.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libpam.c b/lib/libpam.c index bbfa7e32..6d2acba7 100644 --- a/lib/libpam.c +++ b/lib/libpam.c @@ -1074,7 +1074,7 @@ pm_feed_from_pamtuples(int const pipeToFeedFd, outpam.file = fdopen(pipeToFeedFd, "w"); /* The following signals (and normally kills) the process with - SIGPIPE if the pipe does not take all 'inputLength' bytes. + SIGPIPE if the pipe does not take all the data. */ pnm_writepam(&outpam, *inputTuplesP->tuplesP); @@ -1089,10 +1089,11 @@ pm_accept_to_pamtuples(int const pipeToSuckFd, struct pamtuples * const outputTuplesP = accepterParm; - struct pam inpam; + struct pam * const inpamP = outputTuplesP->pamP; *outputTuplesP->tuplesP = - pnm_readpam(fdopen(pipeToSuckFd, "r"), &inpam, sizeof(inpam)); + pnm_readpam(fdopen(pipeToSuckFd, "r"), inpamP, + PAM_STRUCT_SIZE(tuple_type)); - pm_close(inpam.file); + pm_close(inpamP->file); } |