summaryrefslogtreecommitdiff
path: root/source4/lib/registry/patchfile_dotreg.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-05-28 08:11:05 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-05-28 08:11:05 +1000
commit51ae2302a68033b1b79a4ebc8d4cbab64adcf843 (patch)
treed8b1af54efe4ec70607ef2bcbd873c2cd667d894 /source4/lib/registry/patchfile_dotreg.c
parent5d0d239d1ab826c91839a603f93d2c0061658888 (diff)
parent52b230141b5ad9f317f97e7d257703614bab3985 (diff)
downloadsamba-51ae2302a68033b1b79a4ebc8d4cbab64adcf843.tar.gz
samba-51ae2302a68033b1b79a4ebc8d4cbab64adcf843.tar.bz2
samba-51ae2302a68033b1b79a4ebc8d4cbab64adcf843.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
It seems the format of main.mk changed in my sleep... Conflicts: source/main.mk (This used to be commit 56f2288e4f4f1aa70d11fc5f118458baf5803627)
Diffstat (limited to 'source4/lib/registry/patchfile_dotreg.c')
-rw-r--r--source4/lib/registry/patchfile_dotreg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/lib/registry/patchfile_dotreg.c b/source4/lib/registry/patchfile_dotreg.c
index 59f4044713..1bc9c60753 100644
--- a/source4/lib/registry/patchfile_dotreg.c
+++ b/source4/lib/registry/patchfile_dotreg.c
@@ -3,7 +3,7 @@
Reading .REG files
Copyright (C) Jelmer Vernooij 2004-2007
- Copyright (C) Wilco Baan Hofman 2006
+ Copyright (C) Wilco Baan Hofman 2006-2008
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* FIXME Newer .REG files, created by Windows XP and above use unicode UTF-16 */
+/* FIXME Newer .REG files, created by Windows XP and above use unicode UCS-2 */
#include "includes.h"
#include "lib/registry/registry.h"
@@ -112,8 +112,8 @@ _PUBLIC_ WERROR reg_dotreg_diff_save(TALLOC_CTX *ctx, const char *filename,
data->iconv_convenience = iconv_convenience;
if (filename) {
- data->fd = open(filename, O_CREAT, 0755);
- if (data->fd == -1) {
+ data->fd = open(filename, O_CREAT|O_WRONLY, 0755);
+ if (data->fd < 0) {
DEBUG(0, ("Unable to open %s\n", filename));
return WERR_BADFILE;
}
@@ -121,7 +121,7 @@ _PUBLIC_ WERROR reg_dotreg_diff_save(TALLOC_CTX *ctx, const char *filename,
data->fd = STDOUT_FILENO;
}
- fdprintf(data->fd, "%s\n", HEADER_STRING);
+ fdprintf(data->fd, "%s\n\n", HEADER_STRING);
*callbacks = talloc(ctx, struct reg_diff_callbacks);