1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

185 Commits

Author SHA1 Message Date
Günther Deschner
27022587e3 s3-libsmb: move protos to libsmb/proto.h
Guenther
2011-05-06 16:37:18 +02:00
Jeremy Allison
9eee6e2fd2 More const fixes... getting near the end now.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri May  6 00:57:00 CEST 2011 on sn-devel-104
2011-05-06 00:57:00 +02:00
Jeremy Allison
f85e095dd2 More simple const fixups. 2011-05-05 23:56:08 +02:00
Jeremy Allison
df023b8657 Tidy up some missing checks for NULL in strlcpy. 2011-05-04 12:12:15 -07:00
Jeremy Allison
6f7c4a0539 Convert safe_strXX to strlXXX. Clean up off-by-ones. 2011-05-04 12:12:15 -07:00
Andrew Bartlett
0520da2bbe s3-smb Use FILE_ATTRIBUTE_ARCHIVE intead of aARCH
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
0eca33bbf6 s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIR
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
0a3c84b554 s3-smb Use FILE_ATTRIBUTE_SYSTEM intead of aSYSTEM
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00
Andrew Bartlett
317e19aeb3 s3-smb Use FILE_ATTRIBUTE_HIDDEN intead of aHIDDEN
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:12 +10:00
Andrew Bartlett
7f66ebde2e s3-smb Use FILE_ATTRIBUTE_READONLY intead of aRONLY
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:12 +10:00
Volker Lendecke
0226428eb9 s3: Use cli_writeall instead of cli_write
Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-26 12:22:55 -07:00
Günther Deschner
0e771263ee s3-includes: only include system/filesys.h when needed.
Guenther
2011-03-30 01:13:07 +02:00
Volker Lendecke
7c868e6174 s3: Fix Coverity ID 83: RESOURCE_LEAK 2011-03-27 22:22:10 +02:00
Andrew Bartlett
9da4ace1d9 s3-debug Impove setup_logging() to specify logging to stderr
This change improves the setup_logging() API so that callers which
wish to set up logging to stderr can simply ask for it, rather than
directly modify the dbf global variable.

Andrew Bartlett
2010-11-02 04:36:04 +00:00
Jeremy Allison
14ff2e8de9 Fix bug #7700 - Improvement of return code of smbclient
Based on an initial patch from H Hasegawa <hasegawa.hiroyuki@fujixerox.co.jp>.
Convert cli_list and associated functions to take calls that return NTSTATUS.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 29 19:40:16 UTC 2010 on sn-devel-104
2010-10-29 19:40:16 +00:00
Björn Jacke
5728b0fb5f s3: use monotonic clock for time deltas in smbtar 2010-08-31 10:26:09 +02:00
Volker Lendecke
fcdda8f443 s3: Remove "cli" from "struct finfo" 2010-07-30 17:01:33 +02:00
Volker Lendecke
dace013898 s3: Remove a typedef (struct file_info) 2010-07-27 21:05:35 +02:00
Andreas Schneider
ee01fe8c5b s3-client: Make sure we only write to an opened file.
Found by clang-analyzer.
2010-06-29 11:12:12 +02:00
Volker Lendecke
5ba42b0a5b s3: "tar_parseargs" only looks at the mtime 2009-11-29 11:22:02 +01:00
Volker Lendecke
e1f53e5d49 s3: "dotareof" only looks at the file type 2009-11-29 11:22:02 +01:00
Volker Lendecke
44ce5603dd s3: Pass the "fake dir create times" parameter to sys_*stat
Step 0 to restore it as a per-share paramter
2009-11-29 11:22:01 +01:00
Volker Lendecke
d6e55d8ec0 Revert "s3: Make the implicit reference to Protocol in mask_match_list() explicit"
This reverts commit 1e22899d26.
2009-11-23 16:35:00 +01:00
Volker Lendecke
0f8e2a6ebb Revert "s3: Move the global variable Protocol to struct smbd_server_connection"
This reverts commit c85a4c9ba4.
2009-11-23 16:34:59 +01:00
Volker Lendecke
c85a4c9ba4 s3: Move the global variable Protocol to struct smbd_server_connection 2009-11-21 20:49:17 +01:00
Volker Lendecke
1e22899d26 s3: Make the implicit reference to Protocol in mask_match_list() explicit 2009-11-21 20:49:17 +01:00
Volker Lendecke
49ca690b4b Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STAT
This patch introduces

struct stat_ex {
        dev_t           st_ex_dev;
        ino_t           st_ex_ino;
        mode_t          st_ex_mode;
        nlink_t         st_ex_nlink;
        uid_t           st_ex_uid;
        gid_t           st_ex_gid;
        dev_t           st_ex_rdev;
        off_t           st_ex_size;
        struct timespec st_ex_atime;
        struct timespec st_ex_mtime;
        struct timespec st_ex_ctime;
        struct timespec st_ex_btime; /* birthtime */
        blksize_t       st_ex_blksize;
        blkcnt_t        st_ex_blocks;
};
typedef struct stat_ex SMB_STRUCT_STAT;

It is really large because due to the friendly libc headers playing macro
tricks with fields like st_ino, so I renamed them to st_ex_xxx.

Why this change? To support birthtime, we already have quite a few #ifdef's at
places where it does not really belong. With a stat struct that we control, we
can consolidate the nanosecond timestamps and the birthtime deep in the VFS
stat calls.

At this moment it is triggered by a request to support the birthtime field for
GPFS. GPFS does not extend the system level struct stat, but instead has a
separate call that gets us the additional information beyond posix. Without
being able to do that within the VFS stat calls, that support would have to be
scattered around the main smbd code.

It will very likely break all the onefs modules, but I think the changes will
be reasonably easy to do.
2009-05-26 17:48:23 +02:00
Jeremy Allison
606edf0f35 Make cli_setatr async.
Jeremy.
2009-05-06 16:13:42 -07:00
Jeremy Allison
4cbd0c77e4 Make cli_getatr() async.
Jeremy.
2009-05-05 20:59:22 -07:00
Volker Lendecke
4949a2cfaa Fix some warnings due to uint16_t!=-1 always being true 2009-05-03 22:48:31 +02:00
Jeremy Allison
f3af298e5b Cause cli_close to return an NTSTATUS.
Jeremy.
2009-04-30 16:57:42 -07:00
Jeremy Allison
8cf78ff553 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.
2009-04-30 15:26:43 -07:00
Jeremy Allison
502f47c7c0 Make cli_chkpath async.
Jeremy
2009-04-22 06:46:42 -07:00
Jeremy Allison
dfc79de607 Make cli_mkdir async. Change it to return NTSTATUS.
Jeremy.
2009-04-21 05:52:34 -07:00
Jeremy Allison
66c0f3690a Fix bug #6161 - smbclient corrupts source path in tar mode
This was my fault. I broke the smbclient tar argument processing
in creating the string for chdir when removing pstrings.
Jeremy.
2009-03-05 17:19:18 -08:00
Jeremy Allison
07e0094365 Fix all warnings in source3 with gcc4.3.
Jeremy.
2008-12-31 18:06:57 -08:00
Jelmer Vernooij
4746f79d50 Use {u,}int64_t instead of SMB_BIG_{U,}INT. 2008-10-14 01:59:36 +02:00
Volker Lendecke
c8dfed63a6 Fix a brown paper bag segfault in clitar
Thanks to "No Body is Perfect" from gmail, whoever that is :-)

Volker
(cherry picked from commit 679d8dfa39)
(This used to be commit b8e1d62b8e)
2008-06-17 21:14:47 +02:00
Volker Lendecke
fa495ce1c1 Fix Coverity ID 564
finfo1==NULL just does not happen in current code
(This used to be commit 9ea0078c31)
2008-03-15 22:30:25 +01:00
Volker Lendecke
ba6c78c355 Fix Coverity ID 463
(This used to be commit 21d126c56a)
2008-01-24 16:31:55 +01:00
Volker Lendecke
587cf54c61 strtok -> strtok_r
(This used to be commit fd34ce4370)
2008-01-23 15:08:04 +01:00
Volker Lendecke
bea1659911 Remove next_token_nr_talloc and its associated global
Only client.c and clitar.c used this, I think they should carry the static
themselves. Also move the a bit funny routine toktocliplist to clitar.c, the
only place where it is used.
(This used to be commit 86d9412611)
2007-12-21 09:58:20 +01:00
Volker Lendecke
d58868f2a4 C++ warning
(This used to be commit 85a7f800b6)
2007-12-09 17:04:05 +01:00
Jeremy Allison
67344a467f Remove pstring from clitar.c
Jeremy
(This used to be commit 1d5fee5038)
2007-12-07 11:28:16 -08:00
Jeremy Allison
e67a6620a7 Add popt to binaries in makefile. Hack clitar to compile until I fix it.
Jeremy.
(This used to be commit 252ef28bb8)
2007-12-06 18:08:01 -08:00
Jeremy Allison
0cfad17e4a Fix bug #4393 smbclient does not store files with zero filesize in tar-archives
from tometzky@batory.org.pl.
Jeremy.
(This used to be commit f3bd5e828a)
2007-11-16 17:06:36 -08:00
Jeremy Allison
68be9a8200 More pstring removal. This one was tricky. I had to add
one horror (pstring_clean_name()) which will have to
remain until I've removed all pstrings from the client code.
Jeremy.
(This used to be commit 1ea3ac8014)
2007-11-15 14:19:52 -08:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00