Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/lib/sysquotas.c

    r746 r988  
    3131#elif defined(HAVE_QUOTACTL_4B)
    3232
    33 #error HAVE_QUOTACTL_4B not implemeted
    34 
    3533/*#endif HAVE_QUOTACTL_4B */
    3634#elif defined(HAVE_QUOTACTL_3)
     
    175173        int (*set_quota)(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp);
    176174} sys_quota_backends[] = {
    177 #ifdef HAVE_XFS_QUOTAS
     175#if defined HAVE_XFS_QUOTAS
    178176        {"xfs", sys_get_xfs_quota,      sys_set_xfs_quota},
    179177        {"gfs", sys_get_xfs_quota,      sys_set_xfs_quota},
     
    192190        char **lines = NULL;
    193191
    194         get_quota_command = lp_get_quota_command();
     192        get_quota_command = lp_get_quota_command(talloc_tos());
    195193        if (get_quota_command && *get_quota_command) {
    196194                const char *p;
     
    213211                }
    214212
    215                 if (asprintf(&syscmd, "%s \"%s\" %d %d",
     213                if (asprintf(&syscmd, "%s %s %d %d",
    216214                        get_quota_command, path, qtype, _id) < 0) {
    217215                        return -1;
     
    230228                        /* we need to deal with long long unsigned here, if supported */
    231229
    232                         dp->qflags = (enum SMB_QUOTA_TYPE)strtoul(line, &p2, 10);
     230                        dp->qflags = strtoul(line, &p2, 10);
    233231                        p = p2;
    234232                        while (p && *p && isspace(*p)) {
     
    336334        const char *set_quota_command;
    337335
    338         set_quota_command = lp_set_quota_command();
     336        set_quota_command = lp_set_quota_command(talloc_tos());
    339337        if (set_quota_command && *set_quota_command) {
    340338                char **lines = NULL;
     
    356354
    357355                if (asprintf(&syscmd,
    358                         "%s \"%s\" %d %d "
     356                        "%s %s %d %d "
    359357                        "%u %llu %llu "
    360358                        "%llu %llu %llu ",
     
    411409
    412410        errno = 0;
    413         DEBUG(10,("sys_get_quota() uid(%u, %u)\n", (unsigned)getuid(), (unsigned)geteuid()));
     411        DEBUG(10,("sys_get_quota() uid(%u, %u), fs(%s)\n", (unsigned)getuid(), (unsigned)geteuid(), fs));
    414412
    415413        for (i=0;(fs && sys_quota_backends[i].name && sys_quota_backends[i].get_quota);i++) {
Note: See TracChangeset for help on using the changeset viewer.