Fix writing ICEAuthority file
Commit 9398f6cf "Remove iceauth dependency" introduced two bugs:
-
"fp" is never closed, so the generated auth data stays buffered in memory for some indeterminate time and the file stays empty on disk. This completely breaks authentication and thus also session restore.
-
Checking the return value of IceWriteAuthFileEntry() is inverted (the function returns non-zero on success), so warnings are printed iff everything goes well.