summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-09 13:28:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:52:40 -0500
commit2ec69980c8a5a8fd1ea9a5a6bbf62c40d9c14f3f (patch)
treee7bd84bd7524ce94c819a2d840c5c264efdbf167
parent2170981c24f73beb47d437ff25e88b3c320e1ea5 (diff)
downloadsamba-2ec69980c8a5a8fd1ea9a5a6bbf62c40d9c14f3f.tar.gz
samba-2ec69980c8a5a8fd1ea9a5a6bbf62c40d9c14f3f.tar.bz2
samba-2ec69980c8a5a8fd1ea9a5a6bbf62c40d9c14f3f.zip
r14067: give more usefull errors
metze (This used to be commit bc5281a95f2c79f88895282e8e38add116eef789)
-rw-r--r--source4/lib/samba3/winsdb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/lib/samba3/winsdb.c b/source4/lib/samba3/winsdb.c
index cd052ca437..18e6c1004f 100644
--- a/source4/lib/samba3/winsdb.c
+++ b/source4/lib/samba3/winsdb.c
@@ -35,7 +35,7 @@ NTSTATUS samba3_read_winsdb( const char *fn, TALLOC_CTX *ctx, struct samba3_wins
if((fp = x_fopen(fn,O_RDONLY,0)) == NULL) {
DEBUG(0,("initialise_wins: Can't open wins database file %s. Error was %s\n",
fn, strerror(errno) ));
- return NT_STATUS_UNSUCCESSFUL;
+ return NT_STATUS_OPEN_FAILED;
}
*count = 0;
@@ -53,8 +53,9 @@ NTSTATUS samba3_read_winsdb( const char *fn, TALLOC_CTX *ctx, struct samba3_wins
/* Read a line from the wins.dat file. Strips whitespace
from the beginning and end of the line. */
line = fgets_slash(NULL,8,fp);
- if (!line)
- return NT_STATUS_UNSUCCESSFUL;
+ if (!line) {
+ return NT_STATUS_UNEXPECTED_IO_ERROR;
+ }
if (*line == '#') {
SAFE_FREE(line);
@@ -67,7 +68,7 @@ NTSTATUS samba3_read_winsdb( const char *fn, TALLOC_CTX *ctx, struct samba3_wins
DEBUG(0,("Discarding invalid wins.dat file [%s]\n",line));
SAFE_FREE(line);
x_fclose(fp);
- return NT_STATUS_UNSUCCESSFUL;
+ return NT_STATUS_REVISION_MISMATCH;
}
SAFE_FREE(line);