s3: VFS: acl_tdb: Remove unused get_acl_blob_at().
authorJeremy Allison <jra@samba.org>
Tue, 8 Jun 2021 19:42:52 +0000 (12:42 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:31 +0000 (13:14 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_acl_tdb.c

index 3818b15e3f951fdd56374c3896d07e4cfcc756b5..bccb1ab0bec75b23e6059d94c417e68fe3f226f2 100644 (file)
@@ -154,64 +154,6 @@ static NTSTATUS fget_acl_blob(TALLOC_CTX *ctx,
        return NT_STATUS_OK;
 }
 
-#if 0
-/*******************************************************************
- Pull a security descriptor into a DATA_BLOB from a tdb store.
-*******************************************************************/
-
-static NTSTATUS get_acl_blob_at(TALLOC_CTX *ctx,
-                       vfs_handle_struct *handle,
-                       struct files_struct *dirfsp,
-                       const struct smb_filename *smb_fname,
-                       DATA_BLOB *pblob)
-{
-       uint8_t id_buf[16];
-       TDB_DATA data;
-       struct file_id id;
-       struct db_context *db = acl_db;
-       NTSTATUS status = NT_STATUS_OK;
-       SMB_STRUCT_STAT sbuf;
-       int ret;
-
-       ZERO_STRUCT(sbuf);
-
-       ret = vfs_stat_smb_basename(handle->conn,
-                               smb_fname,
-                               &sbuf);
-       if (ret == -1) {
-               status = map_nt_error_from_unix(errno);
-       }
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       id = vfs_file_id_from_sbuf(handle->conn, &sbuf);
-
-       /* For backwards compatibility only store the dev/inode. */
-       push_file_id_16((char *)id_buf, &id);
-
-       status = dbwrap_fetch(db,
-                             ctx,
-                             make_tdb_data(id_buf, sizeof(id_buf)),
-                             &data);
-       if (!NT_STATUS_IS_OK(status)) {
-               return NT_STATUS_INTERNAL_DB_CORRUPTION;
-       }
-
-       pblob->data = data.dptr;
-       pblob->length = data.dsize;
-
-       DBG_DEBUG("returned %u bytes from file %s\n",
-               (unsigned int)data.dsize, smb_fname->base_name );
-
-       if (pblob->length == 0 || pblob->data == NULL) {
-               return NT_STATUS_NOT_FOUND;
-       }
-       return NT_STATUS_OK;
-}
-#endif
-
 /*******************************************************************
  Store a DATA_BLOB into a tdb record given an fsp pointer.
 *******************************************************************/