Changeset 221 for branches/samba-3.3.x/source/libsmb/libsmb_xattr.c
- Timestamp:
- May 24, 2009, 7:17:10 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/libsmb/libsmb_xattr.c
r206 r221 1274 1274 ",%s:%lu", 1275 1275 attr_strings.create_time_attr, 1276 create_time);1276 (unsigned long) create_time); 1277 1277 if (!p) { 1278 1278 errno = ENOMEM; … … 1284 1284 ",%s:%lu", 1285 1285 attr_strings.create_time_attr, 1286 create_time);1286 (unsigned long) create_time); 1287 1287 } 1288 1288 } else if (StrCaseCmp(name, attr_strings.create_time_attr) == 0) { 1289 1289 if (determine_size) { 1290 p = talloc_asprintf(ctx, "%lu", create_time);1290 p = talloc_asprintf(ctx, "%lu", (unsigned long) create_time); 1291 1291 if (!p) { 1292 1292 errno = ENOMEM; … … 1296 1296 } else { 1297 1297 n = snprintf(buf, bufsize, 1298 "%lu", create_time);1298 "%lu", (unsigned long) create_time); 1299 1299 } 1300 1300 } … … 1316 1316 ",%s:%lu", 1317 1317 attr_strings.access_time_attr, 1318 access_time);1318 (unsigned long) access_time); 1319 1319 if (!p) { 1320 1320 errno = ENOMEM; … … 1326 1326 ",%s:%lu", 1327 1327 attr_strings.access_time_attr, 1328 access_time);1328 (unsigned long) access_time); 1329 1329 } 1330 1330 } else if (StrCaseCmp(name, attr_strings.access_time_attr) == 0) { 1331 1331 if (determine_size) { 1332 p = talloc_asprintf(ctx, "%lu", access_time);1332 p = talloc_asprintf(ctx, "%lu", (unsigned long) access_time); 1333 1333 if (!p) { 1334 1334 errno = ENOMEM; … … 1338 1338 } else { 1339 1339 n = snprintf(buf, bufsize, 1340 "%lu", access_time);1340 "%lu", (unsigned long) access_time); 1341 1341 } 1342 1342 } … … 1358 1358 ",%s:%lu", 1359 1359 attr_strings.write_time_attr, 1360 write_time);1360 (unsigned long) write_time); 1361 1361 if (!p) { 1362 1362 errno = ENOMEM; … … 1368 1368 ",%s:%lu", 1369 1369 attr_strings.write_time_attr, 1370 write_time);1370 (unsigned long) write_time); 1371 1371 } 1372 1372 } else if (StrCaseCmp(name, attr_strings.write_time_attr) == 0) { 1373 1373 if (determine_size) { 1374 p = talloc_asprintf(ctx, "%lu", write_time);1374 p = talloc_asprintf(ctx, "%lu", (unsigned long) write_time); 1375 1375 if (!p) { 1376 1376 errno = ENOMEM; … … 1380 1380 } else { 1381 1381 n = snprintf(buf, bufsize, 1382 "%lu", write_time);1382 "%lu", (unsigned long) write_time); 1383 1383 } 1384 1384 } … … 1400 1400 ",%s:%lu", 1401 1401 attr_strings.change_time_attr, 1402 change_time);1402 (unsigned long) change_time); 1403 1403 if (!p) { 1404 1404 errno = ENOMEM; … … 1410 1410 ",%s:%lu", 1411 1411 attr_strings.change_time_attr, 1412 change_time);1412 (unsigned long) change_time); 1413 1413 } 1414 1414 } else if (StrCaseCmp(name, attr_strings.change_time_attr) == 0) { 1415 1415 if (determine_size) { 1416 p = talloc_asprintf(ctx, "%lu", change_time);1416 p = talloc_asprintf(ctx, "%lu", (unsigned long) change_time); 1417 1417 if (!p) { 1418 1418 errno = ENOMEM; … … 1422 1422 } else { 1423 1423 n = snprintf(buf, bufsize, 1424 "%lu", change_time);1424 "%lu", (unsigned long) change_time); 1425 1425 } 1426 1426 } … … 1502 1502 POLICY_HND *pol, 1503 1503 const char *filename, 1504 c onst char *the_acl,1504 char *the_acl, 1505 1505 int mode, 1506 1506 int flags) … … 1532 1532 } 1533 1533 1534 sd = sec_desc_parse(ctx, ipc_cli, pol, numeric, 1535 CONST_DISCARD(char *, the_acl)); 1534 sd = sec_desc_parse(ctx, ipc_cli, pol, numeric, the_acl); 1536 1535 1537 1536 if (!sd) { … … 2115 2114 2116 2115 /* Yup. */ 2116 char *filename = (char *) name; 2117 2117 ret = cacl_get(context, talloc_tos(), srv, 2118 2118 ipc_srv == NULL ? NULL : ipc_srv->cli, 2119 2119 &ipc_srv->pol, path, 2120 CONST_DISCARD(char *, name), 2121 CONST_DISCARD(char *, value), size); 2120 filename, 2121 CONST_DISCARD(char *, value), 2122 size); 2122 2123 if (ret < 0 && errno == 0) { 2123 2124 errno = SMBC_errno(context, srv->cli); … … 2238 2239 ret = cacl_set(talloc_tos(), srv->cli, 2239 2240 ipc_srv->cli, &ipc_srv->pol, path, 2240 name + 19, SMBC_XATTR_MODE_REMOVE, 0); 2241 CONST_DISCARD(char *, name) + 19, 2242 SMBC_XATTR_MODE_REMOVE, 0); 2241 2243 TALLOC_FREE(frame); 2242 2244 return ret;
Note:
See TracChangeset
for help on using the changeset viewer.