~ubuntu-branches/ubuntu/maverick/samba/maverick-security

« back to all changes in this revision

Viewing changes to source/include/libsmbclient.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-03-03 22:02:23 UTC
  • mfrom: (0.28.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090303220223-3bdlm2d9fwx1p1ye
Tags: 2:3.3.1-1ubuntu1
* Merge from Debian unstable (LP: #337094), remaining changes:
  + debian/patches/VERSION.patch:
    - setup SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access. 
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/mksambapasswd.awk:
    - Do not add user with UID less than 1000 to smbpasswd.
  + debian/control:
    - Make libwbclient0 replace/conflict with hardy's likewise-open.
    - Don't build against ctdb.
  + debian/rules:
    - enable "native" PIE hardening.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
* Dropped changes, merged in Debian:
  + debian/libpam-smbpass.pam-config, debian/libpam-smbpass.postinst,
    debian/libpam-smbpass.prerm, debian/libpam-smbpass.files,
    debian/rules:
    - Make libpam-smbpasswd depend on libpam-runtime to allow 
      libpam-smbpasswd for auto-configuration.
  + debian/control:
    - Provide a config block for the new PAM framework to auto-configure
      itself
  + debian/samba.postinst:
    - When populating the new sambashare group, it is not an error
      if the user simply does not exist; test for this case and let
      the install continue instead of aborting.
  + debian/winbind.files:
    - include additional files

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
/* Make sure we have the following includes for now ... */
76
76
#include <sys/types.h>
77
77
#include <sys/stat.h>
 
78
#include <sys/statvfs.h>
78
79
#include <fcntl.h>
79
80
#include <utime.h>
80
81
 
174
175
} smbc_smb_encrypt_level;
175
176
 
176
177
 
 
178
/**
 
179
 * Capabilities set in the f_flag field of struct statvfs, from
 
180
 * smbc_statvfs(). These may be OR-ed together to reflect a full set of
 
181
 * available capabilities.
 
182
 */
 
183
typedef enum smbc_vfs_feature
 
184
{
 
185
    /* Defined by POSIX or in Linux include files (low-order bits) */
 
186
    SMBC_VFS_FEATURE_RDONLY         = (1 << 0),
 
187
 
 
188
    /* Specific to libsmbclient (high-order bits) */
 
189
    SMBC_VFS_FEATURE_DFS              = (1 << 28),
 
190
    SMBC_VFS_FEATURE_CASE_INSENSITIVE = (1 << 29),
 
191
    SMBC_VFS_FEATURE_NO_UNIXCIFS      = (1 << 30)
 
192
} smbc_vfs_feature;
 
193
 
177
194
typedef int smbc_bool;
178
195
 
179
196
 
853
870
smbc_fstat_fn smbc_getFunctionFstat(SMBCCTX *c);
854
871
void smbc_setFunctionFstat(SMBCCTX *c, smbc_fstat_fn fn);
855
872
 
 
873
typedef int (*smbc_statvfs_fn)(SMBCCTX *c,
 
874
                               char *path,
 
875
                               struct statvfs *st);
 
876
smbc_statvfs_fn smbc_getFunctionStatVFS(SMBCCTX *c);
 
877
void smbc_setFunctionStatVFS(SMBCCTX *c, smbc_statvfs_fn fn);
 
878
 
 
879
typedef int (*smbc_fstatvfs_fn)(SMBCCTX *c,
 
880
                                SMBCFILE *file,
 
881
                                struct statvfs *st);
 
882
smbc_fstatvfs_fn smbc_getFunctionFstatVFS(SMBCCTX *c);
 
883
void smbc_setFunctionFstatVFS(SMBCCTX *c, smbc_fstatvfs_fn fn);
 
884
 
856
885
typedef int (*smbc_ftruncate_fn)(SMBCCTX *c,
857
886
                                 SMBCFILE *f,
858
887
                                 off_t size);
1592
1621
 
1593
1622
 
1594
1623
/**@ingroup attribute
 
1624
 * Get file system information for a specified path.
 
1625
 * 
 
1626
 * @param url       The smb url to get information for
 
1627
 *
 
1628
 * @param st        pointer to a buffer that will be filled with 
 
1629
 *                  standard Unix struct statvfs information.
 
1630
 * 
 
1631
 * @return          EBADF  filedes is bad.
 
1632
 *                  - EACCES Permission denied.
 
1633
 *                  - EBADF fd is not a valid file descriptor
 
1634
 *                  - EINVAL Problems occurred in the underlying routines
 
1635
 *                    or smbc_init not called.
 
1636
 *                  - ENOMEM Out of memory
 
1637
 *
 
1638
 * @see             Unix fstatvfs()
 
1639
 *
 
1640
 */
 
1641
int
 
1642
smbc_statvfs(char *url,
 
1643
             struct statvfs *st);
 
1644
 
 
1645
/**@ingroup attribute
 
1646
 * Get file system information via an file descriptor.
 
1647
 * 
 
1648
 * @param fd        Open file handle from smbc_open(), smbc_creat(),
 
1649
 *                  or smbc_opendir()
 
1650
 *
 
1651
 * @param st        pointer to a buffer that will be filled with 
 
1652
 *                  standard Unix struct statvfs information.
 
1653
 * 
 
1654
 * @return          EBADF  filedes is bad.
 
1655
 *                  - EACCES Permission denied.
 
1656
 *                  - EBADF fd is not a valid file descriptor
 
1657
 *                  - EINVAL Problems occurred in the underlying routines
 
1658
 *                    or smbc_init not called.
 
1659
 *                  - ENOMEM Out of memory
 
1660
 *
 
1661
 * @see             Unix fstatvfs()
 
1662
 *
 
1663
 */
 
1664
int
 
1665
smbc_fstatvfs(int fd,
 
1666
              struct statvfs *st);
 
1667
 
 
1668
 
 
1669
/**@ingroup attribute
1595
1670
 * Truncate a file given a file descriptor
1596
1671
 * 
1597
1672
 * @param fd        Open file handle from smbc_open() or smbc_creat()
2608
2683
                     smbc_bool use_kerberos,
2609
2684
                     char *signing_state);
2610
2685
 
 
2686
/*
 
2687
 * Wrapper around smbc_set_credentials.
 
2688
 * Used to set correct credentials that will
 
2689
 * be used to connect to DFS target share 
 
2690
 * in libsmbclient
 
2691
 */
 
2692
 
 
2693
void
 
2694
smbc_set_credentials_with_fallback(SMBCCTX *ctx,
 
2695
                                   const char *workgroup,
 
2696
                                   const char *user,
 
2697
                                   const char *password);
2611
2698
 
2612
2699
/**
2613
2700
 * @ingroup structure