Changeset 427 for vendor/current/source3/modules
- Timestamp:
- Apr 9, 2010, 3:20:58 PM (15 years ago)
- Location:
- vendor/current/source3/modules
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/modules/vfs_acl_tdb.c
r414 r427 38 38 *******************************************************************/ 39 39 40 static bool acl_tdb_init( struct db_context **pp_db)40 static bool acl_tdb_init(void) 41 41 { 42 42 char *dbname; 43 43 44 44 if (acl_db) { 45 *pp_db = acl_db;46 45 ref_count++; 47 46 return true; … … 56 55 57 56 become_root(); 58 *pp_db = db_open(NULL, dbname, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);57 acl_db = db_open(NULL, dbname, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); 59 58 unbecome_root(); 60 59 61 if ( *pp_db == NULL) {60 if (acl_db == NULL) { 62 61 #if defined(ENOTSUP) 63 62 errno = ENOTSUP; … … 78 77 *******************************************************************/ 79 78 80 static void free_acl_tdb_data(void **pptr) 81 { 82 struct db_context **pp_db = (struct db_context **)pptr; 83 79 static void disconnect_acl_tdb(struct vfs_handle_struct *handle) 80 { 81 SMB_VFS_NEXT_DISCONNECT(handle); 84 82 ref_count--; 85 83 if (ref_count == 0) { 86 TALLOC_FREE(*pp_db); 87 acl_db = NULL; 84 TALLOC_FREE(acl_db); 88 85 } 89 86 } … … 147 144 TDB_DATA data; 148 145 struct file_id id; 149 struct db_context *db ;146 struct db_context *db = acl_db; 150 147 NTSTATUS status = NT_STATUS_OK; 151 148 SMB_STRUCT_STAT sbuf; 152 153 SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context,154 return NT_STATUS_INTERNAL_DB_CORRUPTION);155 149 156 150 ZERO_STRUCT(sbuf); … … 205 199 struct file_id id; 206 200 TDB_DATA data; 207 struct db_context *db ;201 struct db_context *db = acl_db; 208 202 struct db_record *rec; 209 203 NTSTATUS status; … … 211 205 DEBUG(10,("store_acl_blob_fsp: storing blob length %u on file %s\n", 212 206 (unsigned int)pblob->length, fsp_str_dbg(fsp))); 213 214 SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context,215 return NT_STATUS_INTERNAL_DB_CORRUPTION);216 207 217 208 status = vfs_stat_fsp(fsp); … … 244 235 { 245 236 struct smb_filename *smb_fname_tmp = NULL; 246 struct db_context *db ;237 struct db_context *db = acl_db; 247 238 NTSTATUS status; 248 239 int ret = -1; 249 250 SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);251 240 252 241 status = copy_smb_filename(talloc_tos(), smb_fname, &smb_fname_tmp); … … 285 274 286 275 SMB_STRUCT_STAT sbuf; 287 struct db_context *db ;276 struct db_context *db = acl_db; 288 277 int ret = -1; 289 290 SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);291 278 292 279 if (lp_posix_pathnames()) { … … 317 304 const char *user) 318 305 { 319 struct db_context *db;320 306 int ret = SMB_VFS_NEXT_CONNECT(handle, service, user); 321 307 … … 324 310 } 325 311 326 if (!acl_tdb_init( &db)) {312 if (!acl_tdb_init()) { 327 313 SMB_VFS_NEXT_DISCONNECT(handle); 328 314 return -1; 329 315 } 330 331 SMB_VFS_HANDLE_SET_DATA(handle, db, free_acl_tdb_data,332 struct db_context, return -1);333 316 334 317 /* Ensure we have "inherit acls = yes" if we're … … 353 336 { 354 337 SMB_STRUCT_STAT sbuf; 355 struct db_context *db ;338 struct db_context *db = acl_db; 356 339 int ret = -1; 357 358 SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);359 340 360 341 if (lp_posix_pathnames()) { … … 388 369 SMB_ACL_T theacl) 389 370 { 390 struct db_context *db ;371 struct db_context *db = acl_db; 391 372 NTSTATUS status; 392 373 int ret; 393 394 SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);395 374 396 375 status = vfs_stat_fsp(fsp); … … 412 391 static struct vfs_fn_pointers vfs_acl_tdb_fns = { 413 392 .connect_fn = connect_acl_tdb, 393 .disconnect = disconnect_acl_tdb, 414 394 .opendir = opendir_acl_common, 415 395 .mkdir = mkdir_acl_common, -
vendor/current/source3/modules/vfs_aixacl2.c
r414 r427 494 494 .sys_acl_set_fd = aixjfs2_sys_acl_set_fd, 495 495 .sys_acl_delete_def_file = aixjfs2_sys_acl_delete_def_file 496 } 496 }; 497 497 498 498 NTSTATUS vfs_aixacl2_init(void); -
vendor/current/source3/modules/vfs_netatalk.c
r414 r427 132 132 } 133 133 134 if (!(new_list = SMB_CALLOC_ARRAY(name_compare_entry, (count == 0 ? 1 : count + 1))))134 if (!(new_list = SMB_CALLOC_ARRAY(name_compare_entry, count + 2))) 135 135 return; 136 136 -
vendor/current/source3/modules/vfs_scannedonly.c
r414 r427 823 823 path_w_slash = name_w_ending_slash(ctx,path); 824 824 dirp = SMB_VFS_NEXT_OPENDIR(handle, path, NULL, 0); 825 if (!dirp) { 826 return -1; 827 } 825 828 while ((dire = SMB_VFS_NEXT_READDIR(handle, dirp, NULL)) != NULL) { 826 829 if (ISDOT(dire->d_name) || ISDOTDOT(dire->d_name)) { … … 879 882 } 880 883 } 881 return SMB_VFS_NEXT_CLOSEDIR(handle, dirp); 884 SMB_VFS_NEXT_CLOSEDIR(handle, dirp); 885 return SMB_VFS_NEXT_RMDIR(handle, path); 882 886 } 883 887
Note:
See TracChangeset
for help on using the changeset viewer.