This patch fixes the following problem in the Bookreader library, which is part of the DECwindows Motif toolkit. When called from an application, Bookreader changes the caller's effective UID to the real UID, but then never restores it to the original effective UID, before returning control to the calling program. If an application like dxchpwd is run from a non-root account, it fails with a privilege violation.