View | Details | Raw Unified | Return to bug 12967
Collapse All | Expand All

(-)/tmp/tzsetup.c (+3 lines)
Lines 499-504 Link Here
499
499
500
	if (reallydoit) {
500
	if (reallydoit) {
501
		if (copymode) {
501
		if (copymode) {
502
			mode_t old_mask;
502
			fd1 = open(filename, O_RDONLY, 0);
503
			fd1 = open(filename, O_RDONLY, 0);
503
			if (fd1 < 0) {
504
			if (fd1 < 0) {
504
				asprintf(&msg, "Could not open %s: %s",
505
				asprintf(&msg, "Could not open %s: %s",
Lines 509-517 Link Here
509
			}
510
			}
510
511
511
			unlink(_PATH_LOCALTIME);
512
			unlink(_PATH_LOCALTIME);
513
			old_mask = umask(022);
512
			fd2 = open(_PATH_LOCALTIME, 
514
			fd2 = open(_PATH_LOCALTIME, 
513
				   O_CREAT | O_EXCL | O_WRONLY,
515
				   O_CREAT | O_EXCL | O_WRONLY,
514
				   0444);
516
				   0444);
517
			umask(old_mask);
515
			if (fd2 < 0) {
518
			if (fd2 < 0) {
516
				asprintf(&msg, "Could not open "
519
				asprintf(&msg, "Could not open "
517
					 _PATH_LOCALTIME ": %s",
520
					 _PATH_LOCALTIME ": %s",

Return to bug 12967