Changeset 988 for vendor/current/source3/lib/sysquotas.c
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/lib/sysquotas.c
r746 r988 31 31 #elif defined(HAVE_QUOTACTL_4B) 32 32 33 #error HAVE_QUOTACTL_4B not implemeted34 35 33 /*#endif HAVE_QUOTACTL_4B */ 36 34 #elif defined(HAVE_QUOTACTL_3) … … 175 173 int (*set_quota)(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp); 176 174 } sys_quota_backends[] = { 177 #if defHAVE_XFS_QUOTAS175 #if defined HAVE_XFS_QUOTAS 178 176 {"xfs", sys_get_xfs_quota, sys_set_xfs_quota}, 179 177 {"gfs", sys_get_xfs_quota, sys_set_xfs_quota}, … … 192 190 char **lines = NULL; 193 191 194 get_quota_command = lp_get_quota_command( );192 get_quota_command = lp_get_quota_command(talloc_tos()); 195 193 if (get_quota_command && *get_quota_command) { 196 194 const char *p; … … 213 211 } 214 212 215 if (asprintf(&syscmd, "%s \"%s\"%d %d",213 if (asprintf(&syscmd, "%s %s %d %d", 216 214 get_quota_command, path, qtype, _id) < 0) { 217 215 return -1; … … 230 228 /* we need to deal with long long unsigned here, if supported */ 231 229 232 dp->qflags = (enum SMB_QUOTA_TYPE)strtoul(line, &p2, 10);230 dp->qflags = strtoul(line, &p2, 10); 233 231 p = p2; 234 232 while (p && *p && isspace(*p)) { … … 336 334 const char *set_quota_command; 337 335 338 set_quota_command = lp_set_quota_command( );336 set_quota_command = lp_set_quota_command(talloc_tos()); 339 337 if (set_quota_command && *set_quota_command) { 340 338 char **lines = NULL; … … 356 354 357 355 if (asprintf(&syscmd, 358 "%s \"%s\"%d %d "356 "%s %s %d %d " 359 357 "%u %llu %llu " 360 358 "%llu %llu %llu ", … … 411 409 412 410 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)); 414 412 415 413 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.