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

870 Commits

Author SHA1 Message Date
Jeremy Allison
656e86d5fa Make cli_posix_stat() async.
Jeremy.
2009-05-28 13:32:00 -07:00
Jeremy Allison
d74e42e0ec Make getfacl async.
Jeremy.
2009-05-28 13:05:50 -07:00
Jeremy Allison
bd11948107 Add a smbclient "readlink" command and add docs for it.
Jeremy.
2009-05-27 22:02:20 -07:00
Jeremy Allison
f55c7614bd Add aync POSIX hardlink and symlink and torture test for them.
Missing call cli_readlink() is next.
Jeremy.
2009-05-27 17:28:23 -07: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
000da55dd9 Make cli_posix_open() and cli_posix_mkdir() async.
Jeremy.
2009-05-20 18:31:36 -07:00
Jeremy Allison
0a8bb37fa2 Oops. Forgot to delete now unused local from the previous patch.
Jeremy.
2009-05-15 16:16:47 -07:00
Ole Hansen
ad7dca471a Fix bug #6359 - smbclient -L does not list workgroup for hosts with both IPv4 and IPv6 addresses 2009-05-15 16:13:59 -07:00
Jeff Layton
b0c399ce60 mount.cifs: directly include sys/stat.h in mtab.c
This file is mysteriously getting included when built via the makefile,
but when you try to build mtab.o by hand it fails to build. Directly
include it to remove any ambiguity.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2009-05-15 14:31:28 -04:00
Steve French
d35a3952f0 Maximum password length check too short in mount.cifs
Windows allows up to 127 byte passwords, and we using a 64 byte limit
    in most places and a 16 byte limit when using the "pass=" mount option

    Acked-by: Jeff Layton <jlayton@redhat.com>
    Signed-off-by: Steve French <sfrench@us.ibm.com>
2009-05-14 15:04:27 -05: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
Jeremy Allison
e091fdc565 Make cli_getattrE async.
Jeremy.
2009-05-05 16:28:44 -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
370e7209db Make cli_unlink async.
Jeremy.
2009-04-29 18:26:02 -07:00
Jeremy Allison
edd25980b0 More async calls in libsmb/clifile.c
Jeremy.
2009-04-29 10:48:16 -07:00
Jeremy Allison
bd6447dcf2 Convert cli_rename to async.
Jeremy.
2009-04-28 16:43:16 -07:00
Jeremy Allison
06e404f574 Convert cli_posix_unlink() and cli_posix_rmdir()
to async. First trans calls I've done.
Jeremy.
2009-04-28 13:18:51 -07:00
Jeremy Allison
455f2a4c65 Make dskattr async.
Jeremy.
2009-04-22 08:04:53 -07:00
Jeremy Allison
502f47c7c0 Make cli_chkpath async.
Jeremy
2009-04-22 06:46:42 -07:00
Jeremy Allison
5ccf58ff59 Make rmdir async.
Jeremy.
2009-04-21 06:52:54 -07:00
Jeremy Allison
dfc79de607 Make cli_mkdir async. Change it to return NTSTATUS.
Jeremy.
2009-04-21 05:52:34 -07:00
Jelmer Vernooij
4c32978d97 Remove smb_mkstemp() - libreplace will now provide a secure mkstemp() if
the system one is broken.
2009-04-20 23:58:26 +02:00
Jeremy Allison
8dd1faaa29 Remove the global "struct cm_cred_struct" and associated calls, make
callers pass in a struct user_auth_info * instead. This commit causes
smbc_set_credentials() to print out a message telling callers to use
smbc_set_credentials_with_fallback() instead, as smbc_set_credentials()
has a broken API (no SMBCCTX * pointer). No more global variables used
in the connection manager API for client dfs calls.
Jeremy.
2009-03-17 14:53:06 -07:00
Volker Lendecke
8174a90e43 Fix #3954 2009-03-14 12:40:58 +01:00
Jeremy Allison
e5136e9849 Remove the static "struct client_connection" mess which is part of
the problem that stops libsmbclient being thread safe. Subsidiary
DFS connections are now hung off a list inside the cli_state struct.
Much more to do in order to get libsmbclient to thread safety, but
this is a good start.
Jeremy.
2009-03-12 17:59:24 -07:00
Stefan Metzmacher
2fdbafbf54 Revert "s3:libsmb: add an option to cli_push to let the caller provide the buffers"
This reverts commit 9579a6f193.

It's confusing to have a boolean to alter the behavior of cli_push
and as the new feature isn't used yet I revert it.

We can readd a extra function later.

metze
2009-03-12 11:03:50 +01:00
Stefan Metzmacher
9579a6f193 s3:libsmb: add an option to cli_push to let the caller provide the buffers
metze
2009-03-10 14:07:56 +01: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
Steve French
d75df71733 Fix guest mounts
guest session setup, login (user id) as anonymous.
    This patch is for samba bugzilla bug 4640.

    Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com>
    Acked-by: Jeff Layton <jlayton@redhat.com>
    Signed-off-by: Steve French <sfrench@samba.org>
2009-02-24 20:53:46 -06:00
Michael Adam
d7ca499701 s3:mount.cifs: make "mount.cifs -V" print the version, not usage.
Also make "mount.cifs -h" not exit with error exit code but with return code 0.

Michael
2009-02-24 16:59:55 +01:00
Michael Adam
6e16c5eed5 s3:mount.cifs: don't error exit on explicitly requested help...
Michael
2009-02-24 16:59:54 +01:00
Jeremy Allison
faa1100d22 More warning fixes for Solaris.
Jeremy.
2009-02-23 16:22:43 -08:00
Volker Lendecke
0844cca1d5 Replace get_myname() with the talloc version from v3-3-test 2009-02-13 12:15:03 +01:00
Volker Lendecke
1b6543c5f9 Fix Coverity IDs 879 and 880 (RESOURCE_LEAK, REVERSE_INULL) 2009-02-12 23:02:53 +01:00
Jeff Layton
d895ca505f mount.cifs: initialize rc to 0 in main
The value of rc in main() isn't initialized in the declaration. This
wasn't a problem before, but Shirish's fakemount patch can make it so
that we return the uninitialized variable if the -n flag is used.

Fix this by initializing rc to 0.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2009-02-06 08:29:58 -05:00
Shirish Pargaonkar
ea8bd81b6e mount.cifs: add fakemount (-f) and nomtab (-n) flags to mount.cifs
...so that these options work correctly when passed in by mount(8).
2009-02-06 08:13:38 -05:00
Shirish Pargaonkar
16d2fdf575 umount.cifs: clean-up entries in /etc/mtab after unmount
This patch removes the remaining entry in /etc/mtab after a filesystem
is unmounted by canonicalizing the mountpoint supplied on the command
line.

Please refer to bug 4370 in samba bugzilla.
2009-02-05 14:12:42 -05:00
Volker Lendecke
0bd92281e4 Make cli_tcon_andx async 2009-01-30 12:47:59 +01:00
Michael Adam
39ec8791f8 s3: make better use of ccache by not including version.h in every C-file.
version.h changes rather frequently. Since it is included via includes.h,
this means each C file will be a cache miss. This applies to the following
situations:

* When building a new package with a new Samba version

* building in a git branch after calling mkversion.sh
  after a new commit (i.e. virtually always)

This patch improves the situation in the following way:

* remove inlude "version.h" from includes.h

* Use samba_version_string() instead of SAMBA_VERSION_STRING
  in files that use no other macro from version.h instead of
  SAMBA_VERSION_STRING.

* explicitly include "version.h" in those files that use more
  macros from "version.h" than just SAMBA_VERSION_STRING.

Michael
2009-01-15 22:56:01 +01:00
Jeremy Allison
907f085296 Remove smbclient globals that bled into clidfs.c. Now we only have
the connections list and authentication structures to worry about.
Jeremy
2009-01-14 16:08:19 -08:00
Jeremy Allison
2c0a802cf8 Remove another global from clidfs that is only used in client.c.
Jeremy.
2009-01-14 14:26:56 -08:00
Jeremy Allison
590c9b7b6d Fix bug #6021 - smbclient du command does not recuse properly
Jeremy.
2009-01-08 15:41:49 -08:00
Volker Lendecke
01891782fd Fix bug 6014 -- mget shouldn't segfault without arguments
Thanks to kevin.paulus@mtm.kuleuven.be for the bug report

Volker
2009-01-05 15:53:26 +01:00
Jeremy Allison
3d2d0203e5 Remove cli_cm_set_dest_ss() - removes the global dest_ss
from libsmb/clidfs.c. Keep the '-I<address>' option in
smbclient working. The intent is to remove all globals
from libsmb/clidfs.c.
Jeremy.
2009-01-02 12:49:49 -08:00
Jeremy Allison
07e0094365 Fix all warnings in source3 with gcc4.3.
Jeremy.
2008-12-31 18:06:57 -08:00
Jeremy Allison
bb23f5725f Fix more asprintf and "ignoring return code" warnings from gcc 4.3.
Jeremy.
2008-12-31 16:30:11 -08:00
Volker Lendecke
32a7ecf5ce Make smbclient "put" use cli_push
This should fill the TCP socket even beyond the smbclient io_bufsize, very much
like smbclient "get" should do it since 3.2
2008-12-19 23:33:55 +01:00