summaryrefslogtreecommitdiff
path: root/source3/libgpo
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-04-30 15:26:43 -0700
committerJeremy Allison <jra@samba.org>2009-04-30 15:26:43 -0700
commit8cf78ff55312768d0b454b1d7e0560e04e6296da (patch)
tree0a2180f063e3bb9872c2565c92075dfb5dccac81 /source3/libgpo
parentab4b8c9c0438bc5afca17e3ebf05dde6f98bc0aa (diff)
downloadsamba-8cf78ff55312768d0b454b1d7e0560e04e6296da.tar.gz
samba-8cf78ff55312768d0b454b1d7e0560e04e6296da.tar.bz2
samba-8cf78ff55312768d0b454b1d7e0560e04e6296da.zip
Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.
Convert all uses of cli_open(), cli_nt_createXXX to NTSTATUS versions. This is smaller than it looks, it just fixes a lot of old code. Next up, ensure all cli_XX functions return NTSTATUS. Jeremy.
Diffstat (limited to 'source3/libgpo')
-rw-r--r--source3/libgpo/gpo_filesync.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/libgpo/gpo_filesync.c b/source3/libgpo/gpo_filesync.c
index 6d64d7b968..d4b623ad6e 100644
--- a/source3/libgpo/gpo_filesync.c
+++ b/source3/libgpo/gpo_filesync.c
@@ -39,15 +39,15 @@ NTSTATUS gpo_copy_file(TALLOC_CTX *mem_ctx,
const char *unix_path)
{
NTSTATUS result;
- int fnum;
+ uint16_t fnum;
int fd = 0;
char *data = NULL;
static int io_bufsize = 64512;
int read_size = io_bufsize;
off_t nread = 0;
- if ((fnum = cli_open(cli, nt_path, O_RDONLY, DENY_NONE)) == -1) {
- result = NT_STATUS_NO_SUCH_FILE;
+ result = cli_open(cli, nt_path, O_RDONLY, DENY_NONE, &fnum);
+ if (!NT_STATUS_IS_OK(result)) {
goto out;
}