changeset 5080:0e639df44fb5

[gaim-migrate @ 5434] security is good, mmmkay? committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 08 Apr 2003 03:52:29 +0000
parents 6e02fa68d5e1
children 06ad1079487d
files src/gaimrc.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gaimrc.c	Tue Apr 08 03:02:32 2003 +0000
+++ b/src/gaimrc.c	Tue Apr 08 03:52:29 2003 +0000
@@ -1564,6 +1564,7 @@
 	filename_temp = g_strdup_printf("%s.save", filename);
 
 	if ((f = fopen(filename_temp, "w"))) {
+		chmod(filename_temp, S_IRUSR | S_IWUSR);
 		is_saving_prefs = 1;
 		fprintf(f, "# .gaimrc v%d\n", 4);
 		gaimrc_write_users(f);
@@ -1576,7 +1577,6 @@
 #endif
 		gaimrc_write_proxy(f);
 		fclose(f);
-		chmod(filename, S_IRUSR | S_IWUSR);
 		if (rename(filename_temp, filename) < 0)
 			debug_printf("error renaming %s to %s\n", filename_temp, filename);
 		is_saving_prefs = 0;