1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-18 19:17:08 +03:00

49 Commits

Author SHA1 Message Date
Derrell Lipman
fd18b01016 use constant name less likely to cause conflict 2008-03-03 22:56:32 -05:00
Derrell Lipman
76ba37ac46 Missed a few 'deprecated' markers 2008-03-03 18:25:49 -05:00
Derrell Lipman
a67f96fbe9 Continued revamping of libsmbclient.
- James suggested using gcc's "deprecated" attribute to mark the context
  structure fields to generate warnings.  This creates a scenario with the
  best of all worlds.  I'm able to move to an organization that more easily
  allows future enhancements, while avoiding any mandatory changes by
  applications.  Thanks, James!

- Updated WHATSNEW.txt so that it accurately reflects the current state of
  affairs.

Derrell
2008-03-03 18:13:33 -05:00
Derrell Lipman
71e86f13b0 fixed missing white space 2008-03-02 16:13:25 -05:00
Derrell Lipman
1fd65359f6 change variable name from f to fn for function pointers 2008-03-01 21:19:15 -05:00
Derrell Lipman
dec70fa3c0 Comment was in wrong place 2008-03-01 20:56:54 -05:00
Derrell Lipman
a8b4b773d4 Mark smbc_option_{get,set} as deprecated 2008-03-01 20:55:21 -05:00
Derrell Lipman
64b7150d92 Additional revamped libsmbclient documentation
- Ensured that all public functions have documentation in libsmbclient.h
- Reformatted for "proper" indentation
- Re-added temporarily-disabled alternate authentication function capability

Derrell
2008-03-01 20:47:22 -05:00
Derrell Lipman
56429a3d60 Modified revamp of the libsmbclient interface.
Given the tacit (if that) approval by some people, and clear disapproval by
others for my proposed clean-up and reorganization of libsmbclient, I've come
up with a slightly different approach.  This commit changes back to the
original libsmbclient.h SMBCCTX structure which will maintain ABI
compatibility.  I retain, here, the setter and getter functions which all new
code should use.  Older programs already compiled should continue to work
fine.  Older programs being recompiled will encounter compile-time errors
(intentionally!) so that the code can be corrected to use the setter/getter
interfaces.

Although this doesn't clean up the interface in the way I had wanted, the code
reorganization and requirement for new programs to use the setters and getters
allows future progress to be made on libsmbclient without further muddying up
the interface, while retaining the ABI compatibility that was the big issue
causing disapproval.  I hope that this compromise is adequate.

Derrell
2008-03-01 20:47:22 -05:00
Derrell Lipman
d4b4bae8de Initial revamp of the libsmbclient interface.
The libsmbclient interface has suffered from difficulty of improvement and
feature enrichment without causing ABI breakage.  Although there were a number
of issues, the primary ones were:

(a) the user of the library would manually manipulate the context structure
    members, meaning that nothing in the context structure could change other
    than adding stuff at the end;

(b) there were three methods of setting options: setting bits in a flags field
    within the context structure, setting explicit options variables within an
    options structure in the context structure, and by calling the
    smbc_option_set() function;

(c) the authentication callback did not traditionally provide enough
    information to the callee which required adding an option for a callback
    with a different signature, and now there are requests for even more
    information at the callback, requiring yet a third signature and option to
    set it (if we implement that feature).

This commit provides a reorganization of the code which fixes (a) and (b).
The context structure is now entirely opaque, and there are setter and getter
functions for manipulating it.  This makes maintaining ABI consistency much,
much easier.

Additionally, the options setting/getting has been unified into a single
mechanism using smbc_option_set() and smbc_option_get().

Yet to be completed is a refactoring of the authentication callback (c).

The test programs in examples/libsmbclient have been modified (if necessary;
some applications require no changes at all) for the new API and a few have
been minimally tested.

Derrell
2008-03-01 20:47:22 -05:00
Derrell Lipman
6f5051b9c1 add smbc_ftruncate() to emulate POSIX ftruncate() 2008-02-26 21:44:51 -05:00
Derrell Lipman
913c335d21 Fix smbc_listxattr() and friends (bug #5189)
When the capability of using full names for DOS attributes was added, a bug
was introduced which caused the wrong number of bytes to be returned.  This
patch to smbc_listxattr_ctx() fixes the problem.

Thanks to Jack Schmidt for this patch.

Derrell
2008-01-13 17:10:06 -05:00
Andrew Tridgell
87c91e4362 r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Derrell Lipman
2f9be59c10 r21132: - Fixes bug 4366. Documentation for smbc_utimes() was incorrect.
- Should fix bug 4115 (but needs confirmation from OP).  If the kerberos use
  flag is set in the context, then also pass it to smbc_attr_server for use by
  cli_full_connection()

- Should fix bug 4309 (but needs confirmation from OP).  We no longer send a
  keepalive packet unconditionally.  Instead, we assume (yes, possibly
  incorrectly, but it's the best guess we can make) that if the connection is
  on port 139, it's netbios and otherwise, it isn't.  If netbios is in use, we
  send a keepalive packet.  Otherwise, we check that the connection is alive
  using getpeername().
2007-10-10 12:17:42 -05:00
Derrell Lipman
9b6fee5f6f r18013: Fix for "bug" (enhancement) 3684.
Provide a new option to specify the share mode to be used when opening a
file.
2007-10-10 11:39:48 -05:00
Derrell Lipman
c1b4c51053 r16550: Fix bug 3866. Thanks for the report!
Although I've never met a computer or compiler that produced pointers to
functions which are a different size than pointers to data, I suppose they
probably exist.  Assigning a pointer to a function is technically illegal in C
anyway.

Change casts of the option_value based on the option_name to use of variable
argument lists.

For binary compatibility, I've maintained but deprecated the old behavior of
debug_stderr (which expected to be passed a NULL or non-NULL pointer) and
added a new option debug_to_stderr which properly expects a boolean (int)
parameter.

Derrell
2007-10-10 11:18:59 -05:00
Derrell Lipman
203b4911c1 r14664: r13868@cabra: derrell | 2006-03-22 17:04:30 -0500
Implement enhancement request 3505.  Two additional features are added here.
 There is now a method of saving an opaque user data handle in the smbc_
 context, and there is now a way to request that the context be passed to the
 authentication function.  See examples/libsmbclient/testbrowse.c for an example
 of using these features.
2007-10-10 11:15:42 -05:00
Jeremy Allison
6e1cb7047a r11719: Remove silly #define of close -> close_fn as this borks
any code that includes libsmbclient.h that also calls the
system close() fn. Doh ! Thanks to John Terpstra for
reporting this.
Jeremy.
2007-10-10 11:05:25 -05:00
Jeremy Allison
d1caef8663 r11573: Adding Andrew Bartlett's patch to make machine account
logons work if the client gives the MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
or MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT flags. This changes
the auth module interface to 2 (from 1). The effect of this is
that clients can access resources as a machine account if they
set these flags. This is the same as Windows (think of a VPN
where the vpn client authenticates itself to a VPN server
using machine account credentials - the vpn server checks
that the machine password was valid by performing a machine
account check with the PDC in the same was as it would a
user account check. I may add in a restriction (parameter)
to allow this behaviour to be turned off (as it was previously).
That may be on by default.
Andrew Bartlett please review this change carefully.
Jeremy.
2007-10-10 11:05:20 -05:00
Derrell Lipman
1f8aff85a6 r9540: correct comments in struct smbc_dirent (fixes bug 3030) 2007-10-10 11:01:12 -05:00
Volker Lendecke
25cbcfba30 r8093: Next round. Now it compiles with --enable-socket-wrapper.
Volker
2007-10-10 10:58:11 -05:00
Tim Potter
e446f16a40 r5916: Only one C++ guard is necessary, not one around each smbc function. 2007-10-10 10:56:08 -05:00
Gerald Carter
6e8d171551 r5752: implement derrell's solution for binary compatibilty in the _SMBCCTX structure; note that we break compat with 3.0.11 but are ok with earlier versions 2007-10-10 10:55:59 -05:00
Gerald Carter
a5ea01bf15 r5735: rest of derrel's patch for BUG 2308; had to move the options structure from the _SMBCCTX to the internals structure to maintain binary compatibility (derrel, we should talk more about this) 2007-10-10 10:55:58 -05:00
Jeremy Allison
843e85bcd9 r4970: Fix for bug 2092, allowing fallback after kerberos and allow
gnome vfs to prevent auto-anonymous logon.
Jeremy.
2007-10-10 10:55:10 -05:00
Richard Sharpe
63c846fa1d r599: Bug #1178. Make the libsmbclient routines callable by C++ programs. Also
clean up the format of the file a bit.
2007-10-10 10:51:31 -05:00
Tim Potter
eaf69b1ae7 Add prototype for smbc_remove_unused_server() to fix compiler warning.
Bug #706.
-
Richard Sharpe
cf9311044c Commit Derrell's changes to libsmbclient plus a small change to configure.in
to see if SGI and other platforms will build.
-
Jelmer Vernooij
c7a1de090d Add support for the new modules system to auth/ (merge from HEAD) -
Richard Sharpe
fd847aa936 Now that I am running config.developer, I decided to get rif of some warnings:
1. reboot in parse_reg and cli_reg was shadowing a definition on FreeBSD
   4.3 from system includes.

2. Added a bit of const to places.

3. Made sure internal functions were declared where needed.
-
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Tim Potter
43c496598f Made a libsmbclient doxygen group and moved all the libsmbclient groups
under it.
-
Richard Sharpe
7ac404c853 Fix up libsmbclient in head.
Apply the patches from Tom Jansen, get rid of fprintfs and change them to
DEBUGs, etc ...
-
Richard Sharpe
d090ae63ae Updated the inplace documentation to reflect change from EUCLEAN to EINVAL. -
Richard Sharpe
db2e712ad3 More documentation in the header in doxygen format -
Richard Sharpe
e628d80d1e Fix the definition and implementation of smbc_lseekdir ... -
Richard Sharpe
3c66114346 Added commented/documented version of libsmbclient.h and fixed up a small
problem in libsmbclient.c where we no longer pass the workgroup.
-
Richard Sharpe
7c50af3b71 Fix problems in libsmbclient with pring job struct plus add implementation
of last two print routines ...
-
Richard Sharpe
c19559a286 Implement two printing related functions and start the remaining two. -
Richard Sharpe
838cfad404 Fix some further small bugs in libsmbclient to make it pass the
Caldera test suite and start to add the printing routines.
-
Richard Sharpe
66bb40153a Some more bug fixes plus implementations of smbc_mkdir and smbc_rmdir,
both tested ...

More later.
-
Richard Sharpe
7f559c1a73 Many bug fixes to the libsmbclient.c code plus
- an implementation of smbc_readdir
  - extensions to tree.c to show files in a second window
  - changes to auth_fn to provide buffers for username, password, etc
    from caller rather than callee
-
Richard Sharpe
991f6907ac More fixes and implementation bits and pieces for libsmbclient -
Richard Sharpe
807e2e1faa Fix a small type in libsmbclient.h ... -
Richard Sharpe
38ff91c505 The latest changes to libsmbclient ...
It can now do a directory listing for workgroups, servers, and shares, and,
with a bit more effort, it will be able to list directories and files.

I also does not request a username and password for the IPC$ share, but it
should if the first attempt to connect fails.
-
Richard Sharpe
51c0436a50 First pass at the libsmbclient code ...
This code handles the basic stuff and compiles and links under Linux, but
I do not know about any other operating systems. Now onto directory
listing routines, including those that list workgroups, servers, etc.

Nothing is built automatically yet, you have to make client/testsmbc to build
the library and test program. Also, no make install targets are defined for
libsmbclient.so as yet, either.

Would be good if people test on operating systems other than Linux.
-