summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Beck <gbeck@sernet.de>2012-08-27 14:46:22 +0200
committerMichael Adam <obnox@samba.org>2012-10-19 12:14:58 +0200
commit611e30ea233f0e5dab1439e930ea8544b85ca3b2 (patch)
treec690b825349002017b526ca1145365054972666f
parentc9a2111b0025156ba70c6eb9fa857e5d639f62b7 (diff)
downloadsamba-611e30ea233f0e5dab1439e930ea8544b85ca3b2.tar.gz
samba-611e30ea233f0e5dab1439e930ea8544b85ca3b2.tar.bz2
samba-611e30ea233f0e5dab1439e930ea8544b85ca3b2.zip
s3:rpc_server/srvsvc: remove function net_enum_pipes()
The relevant records are not written to connections.tdb since commit a781b78417b6d7b875230dd2edcb932445aa4197 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c97
1 files changed, 0 insertions, 97 deletions
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index 1e734d8999..a6472a67ca 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -60,98 +60,6 @@ struct sess_file_count {
int count;
};
-/* Used to store pipe open records for NetFileEnum() */
-
-struct pipe_open_rec {
- struct server_id pid;
- uid_t uid;
- int pnum;
- fstring name;
-};
-
-/****************************************************************************
- Count the entries belonging to a service in the connection db.
-****************************************************************************/
-
-static int pipe_enum_fn( struct db_record *rec, void *p)
-{
- struct pipe_open_rec prec;
- struct file_enum_count *fenum = (struct file_enum_count *)p;
- struct srvsvc_NetFileInfo3 *f;
- int i = fenum->ctr3->count;
- char *fullpath = NULL;
- const char *username;
- TDB_DATA value;
-
- value = dbwrap_record_get_value(rec);
-
- if (value.dsize != sizeof(struct pipe_open_rec))
- return 0;
-
- memcpy(&prec, value.dptr, sizeof(struct pipe_open_rec));
-
- if ( !process_exists(prec.pid) ) {
- return 0;
- }
-
- username = uidtoname(prec.uid);
-
- if ((fenum->username != NULL)
- && !strequal(username, fenum->username)) {
- return 0;
- }
-
- fullpath = talloc_asprintf(fenum->ctx, "\\PIPE\\%s", prec.name );
- if (!fullpath) {
- return 1;
- }
-
- f = talloc_realloc(fenum->ctx, fenum->ctr3->array,
- struct srvsvc_NetFileInfo3, i+1);
- if ( !f ) {
- DEBUG(0,("conn_enum_fn: realloc failed for %d items\n", i+1));
- return 1;
- }
- fenum->ctr3->array = f;
-
- fenum->ctr3->array[i].fid =
- (((uint32_t)(procid_to_pid(&prec.pid))<<16) | prec.pnum);
- fenum->ctr3->array[i].permissions =
- (FILE_READ_DATA|FILE_WRITE_DATA);
- fenum->ctr3->array[i].num_locks = 0;
- fenum->ctr3->array[i].path = fullpath;
- fenum->ctr3->array[i].user = username;
-
- fenum->ctr3->count++;
-
- return 0;
-}
-
-/*******************************************************************
-********************************************************************/
-
-static WERROR net_enum_pipes(TALLOC_CTX *ctx,
- const char *username,
- struct srvsvc_NetFileCtr3 **ctr3,
- uint32_t resume )
-{
- struct file_enum_count fenum;
-
- fenum.ctx = ctx;
- fenum.username = username;
- fenum.ctr3 = *ctr3;
-
- if (connections_traverse(pipe_enum_fn, &fenum) < 0) {
- DEBUG(0,("net_enum_pipes: traverse of connections.tdb "
- "failed\n"));
- return WERR_NOMEM;
- }
-
- *ctr3 = fenum.ctr3;
-
- return WERR_OK;
-}
-
/*******************************************************************
********************************************************************/
@@ -1106,11 +1014,6 @@ WERROR _srvsvc_NetFileEnum(struct pipes_struct *p,
goto done;
}
- werr = net_enum_pipes(ctx, r->in.user, &ctr3, resume_hnd);
- if (!W_ERROR_IS_OK(werr)) {
- goto done;
- }
-
*r->out.totalentries = ctr3->count;
r->out.info_ctr->ctr.ctr3->array = ctr3->array;
r->out.info_ctr->ctr.ctr3->count = ctr3->count;