~ubuntu-branches/ubuntu/gutsy/samba/gutsy-updates

« back to all changes in this revision

Viewing changes to source/include/libsmbclient.h

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2006-11-28 20:14:37 UTC
  • mfrom: (0.10.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061128201437-a6x4lzlhempazocp
Tags: 3.0.23d-1ubuntu1
* Merge from debian unstable.
* Drop python2.4-samba, replace with python-samba. Added Conflicts/Replaces
  on python2.4-samba
* Drop track-connection-dos.patch, ubuntu-winbind-panic.patch, 
  ubuntu-fix-ldap.patch, ubuntu-setlocale.patch, ubuntu-setlocale-fixes.patch
* Remaining Ubuntu changes:
  - Revert Debian's installation of mount.cifs and umount.cifs as suid
  - Comment out the default [homes] shares and add more verbose comments to
    explain what they do and how they work (closes: launchpad.net/27608)
  - Add a "valid users = %S" stanza to the commented-out [homes] section, to
    show users how to restrict access to \\server\username to only username.
  - Change the (commented-out) "printer admin" example to use "@lpadmin"
    instead of "@ntadmin", since the lpadmin group is used for spool admin.
  - Alter the panic-action script to encourage users to report their
    bugs in Ubuntu packages to Ubuntu, rather than reporting to Debian.
    Modify text to more closely match the Debian script
  - Munge our init script to deal with the fact that our implementation
    (or lack thereof) of log_daemon_msg and log_progress_msg differs
    from Debian's implementation of the same (Ubuntu #19691)
  - Kept ubuntu-auxsrc.patch: some auxilliary sources (undocumented in 
    previous changelogs)
  - Set default workgroup to MSHOME

Show diffs side-by-side

added added

removed removed

Lines of Context:
204
204
 
205
205
 
206
206
/**@ingroup callback
207
 
 * Authentication callback function type.
 
207
 * Authentication callback function type (traditional method)
208
208
 * 
209
209
 * Type for the the authentication function called by the library to
210
210
 * obtain authentication credentals
237
237
                                      char *wg, int wglen, 
238
238
                                      char *un, int unlen,
239
239
                                      char *pw, int pwlen);
 
240
/**@ingroup callback
 
241
 * Authentication callback function type (method that includes context)
 
242
 * 
 
243
 * Type for the the authentication function called by the library to
 
244
 * obtain authentication credentals
 
245
 *
 
246
 * @param c         Pointer to the smb context
 
247
 *
 
248
 * @param srv       Server being authenticated to
 
249
 *
 
250
 * @param shr       Share being authenticated to
 
251
 *
 
252
 * @param wg        Pointer to buffer containing a "hint" for the
 
253
 *                  workgroup to be authenticated.  Should be filled in
 
254
 *                  with the correct workgroup if the hint is wrong.
 
255
 * 
 
256
 * @param wglen     The size of the workgroup buffer in bytes
 
257
 *
 
258
 * @param un        Pointer to buffer containing a "hint" for the
 
259
 *                  user name to be use for authentication. Should be
 
260
 *                  filled in with the correct workgroup if the hint is
 
261
 *                  wrong.
 
262
 * 
 
263
 * @param unlen     The size of the username buffer in bytes
 
264
 *
 
265
 * @param pw        Pointer to buffer containing to which password 
 
266
 *                  copied
 
267
 * 
 
268
 * @param pwlen     The size of the password buffer in bytes
 
269
 *           
 
270
 */
 
271
typedef void (*smbc_get_auth_data_with_context_fn)(SMBCCTX *c,
 
272
                                                   const char *srv, 
 
273
                                                   const char *shr,
 
274
                                                   char *wg, int wglen, 
 
275
                                                   char *un, int unlen,
 
276
                                                   char *pw, int pwlen);
240
277
 
241
278
 
242
279
/**@ingroup callback
422
459
        int        (*unlink_print_job)(SMBCCTX *c, const char *fname, int id);
423
460
 
424
461
 
425
 
        /** Callbacks
426
 
         * These callbacks _always_ have to be initialized because they will not be checked
427
 
         * at dereference for increased speed.
428
 
         */
 
462
        /*
 
463
        ** Callbacks
 
464
        * These callbacks _always_ have to be initialized because they will
 
465
        * not be checked at dereference for increased speed.
 
466
        */
429
467
        struct _smbc_callbacks {
430
468
                /** authentication function callback: called upon auth requests
431
469
                 */
432
 
                smbc_get_auth_data_fn auth_fn;
 
470
                smbc_get_auth_data_fn auth_fn;
433
471
                
434
472
                /** check if a server is still good
435
473
                 */
579
617
 
580
618
 
581
619
/**@ingroup misc
 
620
 * Each time the context structure is changed, we have binary backward
 
621
 * compatibility issues.  Instead of modifying the public portions of the
 
622
 * context structure to add new options, instead, we put them in the internal
 
623
 * portion of the context structure and provide a set function for these new
 
624
 * options.
 
625
 *
 
626
 * @param context   A pointer to a SMBCCTX obtained from smbc_new_context()
 
627
 *
 
628
 * @param option_name
 
629
 *                  The name of the option for which the value is to be set
 
630
 *
 
631
 * @param option_value
 
632
 *                  The new value of the option being set
 
633
 *
 
634
 */
 
635
void
 
636
smbc_option_set(SMBCCTX *context,
 
637
                char *option_name,
 
638
                void *option_value);
 
639
/*
 
640
 * Retrieve the current value of an option
 
641
 *
 
642
 * @param context   A pointer to a SMBCCTX obtained from smbc_new_context()
 
643
 *
 
644
 * @param option_name
 
645
 *                  The name of the option for which the value is to be
 
646
 *                  retrieved
 
647
 *
 
648
 * @return          The value of the specified option.
 
649
 */
 
650
void *
 
651
smbc_option_get(SMBCCTX *context,
 
652
                char *option_name);
 
653
 
 
654
/**@ingroup misc
582
655
 * Initialize a SBMCCTX (a context).
583
656
 *
584
657
 * Must be called before using any SMBCCTX API function
585
658
 *
586
659
 * @param context   A pointer to a SMBCCTX obtained from smbc_new_context()
587
660
 *
588
 
 * @return          A pointer to the given SMBCCTX on success, NULL on error with errno set:
 
661
 * @return          A pointer to the given SMBCCTX on success,
 
662
 *                  NULL on error with errno set:
589
663
 *                  - EBADF  NULL context given
590
664
 *                  - ENOMEM Out of memory
591
665
 *                  - ENOENT The smb.conf file would not load
592
666
 *
593
667
 * @see             smbc_new_context()
594
668
 *
595
 
 * @note            my_context = smbc_init_context(smbc_new_context()) is perfectly safe, 
596
 
 *                  but it might leak memory on smbc_context_init() failure. Avoid this.
597
 
 *                  You'll have to call smbc_free_context() yourself on failure.  
 
669
 * @note            my_context = smbc_init_context(smbc_new_context())
 
670
 *                  is perfectly safe, but it might leak memory on
 
671
 *                  smbc_context_init() failure. Avoid this.
 
672
 *                  You'll have to call smbc_free_context() yourself
 
673
 *                  on failure.  
598
674
 */
599
675
 
600
676
SMBCCTX * smbc_init_context(SMBCCTX * context);