1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

54 Commits

Author SHA1 Message Date
Derrell Lipman
8e119b64f1 r18009: Fixes bug 4026.
This completes the work Jeremy began last week, disambiguating the meaning of
c_time.  (In POSIX terminology, c_time means "status Change time", not "create
time".)  All uses of c_time, a_time and m_time have now been replaced with
change_time, access_time, and write_time, and when creation time is intended,
create_time is used.

Additionally, the capability of setting and retrieving the create time have
been added to the smbc_setxattr() and smbc_getxattr() functions.  An example
of setting all four times can be seen with the program

  examples/libsmbclient/testacl

with the following command line similar to:

  testacl -f -S "system.*:CREATE_TIME:1000000000,ACCESS_TIME:1000000060,WRITE_TIME:1000000120,CHANGE_TIME:1000000180" 'smb://server/share/testfile.txt'

The -f option turns on the new mode which uses full time names in the
attribute specification (e.g. ACCESS_TIME vs A_TIME).
2007-10-10 11:39:47 -05:00
Jeremy Allison
425280a1d2 r17800: Start using struct timespec internally for file times
on the wire. This allows us to go to nsec resolution
for systems that support it. It should also now be
easy to add a correct "create time" (birth time)
for systems that support it (*BSD). I'll be watching
the build farm closely after this one for breakage :-).
Jeremy.
2007-10-10 11:38:48 -05:00
Jeremy Allison
42a417fb75 r17761: Handle times consistently across all client utils.
Fixes bugs reported in libsmbclient.
Jeremy.
2007-10-10 11:38:47 -05:00
Volker Lendecke
be9aaffdac r17333: Some C++ warnings 2007-10-10 11:38:26 -05:00
Jeremy Allison
ce14daf51c r16582: Fix Klocwork #1997 and all generic class of problems
where we don't correctly check the return from memdup.
Jeremy.
2007-10-10 11:19:01 -05:00
Derrell Lipman
aa25dc1248 r13216: r12422@cabra: derrell | 2006-01-28 23:57:35 -0500
Fix cli_setpathinfo() to actually do what it's supposed to.

 Also, get rid of some apparently drug-induced code to deal with create time
 which isn't being manipulated anyway.
2007-10-10 11:06:18 -05:00
Derrell Lipman
481abfbab4 r12466: r12028@cabra: derrell | 2005-12-24 20:25:38 -0500
parse dates correctly.  w_time and m_time were reversed.
2007-10-10 11:05:56 -05:00
Jeremy Allison
414303bc02 r11511: A classic "friday night check-in" :-). This moves much
of the Samba4 timezone handling code back into Samba3.
Gets rid of "kludge-gmt" and removes the effectiveness
of the parameter "time offset" (I can add this back
in very easily if needed) - it's no longer being
looked at. I'm hoping this will fix the problems people
have been having with DST transitions. I'll start comprehensive
testing tomorrow, but for now all modifications are done.
Splits time get/set functions into srv_XXX and cli_XXX
as they need to look at different timezone offsets.
Get rid of much of the "efficiency" cruft that was
added to Samba back in the day when the C library
timezone handling functions were slow.
Jeremy.
2007-10-10 11:05:19 -05:00
Jeremy Allison
d720867a78 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
2007-10-10 11:05:02 -05:00
Tim Potter
985dbb47d9 r8572: Remove crufty #define NO_SYSLOG as it's not used at all anymore. 2007-10-10 11:00:11 -05:00
Derrell Lipman
6c05812bd9 r7172: This is the proper fix for setting file times from libsmbclient. We now
try setpathinfo, and if that doesn't work (e.g. on win98), revert to the
previous slower method.
2007-10-10 10:57:04 -05:00
Derrell Lipman
443d8df94c r6125: smbc_stat() returned incorrect timestamps IFF it used cli_qpathinfo2() to
retrieve the timestamps (Win2k) and not if it used cli-getatr() to retrieve
the timestamps (Win98).  Timestamps are supposed to be in GMT, and should
not have serverzone deducted from them in cli_qpathinfo2().
2007-10-10 10:56:23 -05:00
Gerald Carter
85be4c5df3 r5968: derrell's large file fix for libsmbclient (BUG 2505) 2007-10-10 10:56:13 -05:00
Gerald Carter
5d2624c453 r5542: fix a few more msdfs bugs in smbclient against both smbd and 2k dfs root
shares.
2007-10-10 10:55:46 -05:00
Gerald Carter
e57fd2c5f0 r5518: Add initial msdfs support to smbclient. Currently I can only
cd up and down the tree and get directory listings.

Still have to figure out how to get a directory listing on a
2k dfs root.  Also have to work out some issues with relative paths
that cross dfs mount points.

We're protected from the new code paths when connecting to
a non-dfs root share ( the flag from the tcon&X is stored
in the struct cli_state* )
2007-10-10 10:55:44 -05:00
Richard Sharpe
faa8cc18df r588: Some fixes from coolo ...
I think that the ECONNREFUSED should probably be ENOENT.
2007-10-10 10:51:30 -05:00
Volker Lendecke
005d92d57e That const was one too many -
Volker Lendecke
0b29d83d33 Apply some const
Volker
-
Jim McDonough
4319df7fdc Janitor for tpot...bugzilla #1098, msleep already exists on aix -
Jeremy Allison
0ea0ada6c6 Make SMB_FILE_ACCESS_INFORMATION call work correctly.
Jeremy.
-
Jeremy Allison
5c6f8b1053 Make us bug-for-bug compatible with W2K3 - to get delete on close semantics
on an initial open the desired_access field *must* contain DELETE_ACCESS,
simply having it map from a GENERIC_ALL won't do. Fixes delete on close test.
Jeremy.
-
Andrew Bartlett
2a2b1f0c87 This adds client-side support for the unicode/SAMR password change scheme.
As well as avoiding DOS charset issues, this scheme returns useful error
codes, that we can map back via the pam interface.

This patch also cleans up the interfaces used for password buffers, to
avoid duplication of code.

Andrew Bartlett
-
Herb Lewis
a6a39c61e8 get rid of some sompiler warnings on IRIX -
Jeremy Allison
ff222716a0 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
-
Jelmer Vernooij
e9df7d2820 Fix list of servers in 'smbclient -L' (debian bug #194553, patch by Heine Larsen) -
Jelmer Vernooij
6e9b780233 More merges from HEAD:
- Stephan Kulow's changes (fixing warnings in libsmbclient)
 - VFS modules
 - Seperating libs
-
Andrew Bartlett
980f2eb7c2 pstrcpy_base merges for client-side smbpasswd.
Andrew Bartlett
-
Jeremy Allison
33b11d5eb5 Change size parameters from signed to unsigned to fix up warnings.
Jeremy.
-
Volker Lendecke
54c99ee1fb strcpy_base from HEAD and trivial fix for smbclient -L
Volker
-
Andrew Tridgell
20ebdee36d merge alt_name patch from head -
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
-
Andrew Bartlett
9fa1863d8e Try to catch up on the code I've put into HEAD that should be in 3.0:
- vorlan's hosts allow with DNS names patch
 - use x_fileno() in debug.c, not the struct directly.
 - check for server timeout on password change (was reporting success)
 - better error/status loggin in both the pam_winbind client and winbindd_pam
server code.
 - (pdb_ldap) don't set the ldap version twice - we do it on every bind anyway.
-
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
Andrew Tridgell
d37905f203 added cli_qfilename(), used in trans2 torture test -
Andrew Tridgell
22f348a1f9 fixed a bug in qpathinfo client code -
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Jeremy Allison
d3ac2265b1 Always use ASCII strings when changing passwords with RAP.
Jeremy.
-
Andrew Tridgell
b2eb7feb7f added cli_qpathinfo_alt_name() for fetching the 8.3 name of a file -
Simo Sorce
48fc6a6cd5 move to SAFE_FREE() -
Tim Potter
6dbdb0d813 A rewrite of the error handling in the libsmb client code. I've separated
out the error handling into a bunch of separate functions rather than all
being handled in one big function.

Fetch error codes from the last received packet:

    void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *num);
    uint32 cli_nt_error(struct cli_state *);

Convert errors to UNIX errno values:

    int cli_errno_from_dos(uint8 eclass, uint32 num);
    int cli_errno_from_nt(uint32 status);
    int cli_errno(struct cli_state *cli);

Detect different kinds of errors:

    BOOL cli_is_dos_error(struct cli_state *cli);
    BOOL cli_is_nt_error(struct cli_state *cli);
    BOOL cli_is_error(struct cli_state *cli);

This also means we now support CAP_STATUS32 as we can decode and understand
NT errors instead of just DOS errors.  Yay!

Ported a whole bunch of files in libsmb to use this new API instead of the
just the DOS error.
-
Tim Potter
fb60798a77 Changed the order of arguments in make_oem_passwd_hash(). All the other
encryption functions have outputs as the last arguments.
-
Andrew Tridgell
debb471267 The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
-
Tim Potter
0a505e50a5 Fixed incorrect comment for cli_NetServerEnum() -
Jeremy Allison
244aec8ea6 Following info from TAKAHASHI Motonobu <monyo@samba.gr.jp>,
Samba Users Group Japan, ensure that we don't use dos_to_unix(xx,True),
but always use dos_to_unix(xx,False) to prevent overwriting.
Jeremy.
-
Jeremy Allison
9297ae69a7 New info level tester.
Jeremy.
-
Andrew Tridgell
95c9e4e0ba to use the same macros in the client and server rename the CLISTR_
macros to STR_
-
Andrew Tridgell
ac7529d2b6 converted the last couple of functions in libsmb to be unicode
the whole of libsmb should now do unicode where appropriate
-
Andrew Tridgell
86adbb0caf reverted richards cli_NetServerEnum changes - they broke lots of things -
Andrew Tridgell
f6b8d67304 converted a bunch more fns -
Andrew Tridgell
ba3ce3404e pipe opening now works with unicode -