Provide a separate ypdb_mktemp() API to open a temporary file read-write. Use mkstemp() instead of mktemp(). NOTE: makedbm & mkalias tested ok. I couldn't test ypxfer.