summaryrefslogtreecommitdiff
path: root/source3/smbd/connection.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-10-12 23:09:18 +0200
committerVolker Lendecke <vl@samba.org>2008-10-13 20:59:33 +0200
commita781b78417b6d7b875230dd2edcb932445aa4197 (patch)
treeaf301f9afe7ea77524397c4d750ed775f5fb8a90 /source3/smbd/connection.c
parentac126ea8186364bddfec340189a377978d52c7ae (diff)
downloadsamba-a781b78417b6d7b875230dd2edcb932445aa4197.tar.gz
samba-a781b78417b6d7b875230dd2edcb932445aa4197.tar.bz2
samba-a781b78417b6d7b875230dd2edcb932445aa4197.zip
Remove smb_np_struct
Diffstat (limited to 'source3/smbd/connection.c')
-rw-r--r--source3/smbd/connection.c106
1 files changed, 0 insertions, 106 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c
index fd83f77725..3b72a9505a 100644
--- a/source3/smbd/connection.c
+++ b/source3/smbd/connection.c
@@ -224,109 +224,3 @@ bool register_message_flags(bool doreg, uint32 msg_flags)
return True;
}
-
-/*********************************************************************
-*********************************************************************/
-
-static TDB_DATA* make_pipe_rec_key( struct pipe_open_rec *prec )
-{
- TDB_DATA *kbuf = NULL;
- fstring key_string;
-
- if ( !prec )
- return NULL;
-
- if ( (kbuf = TALLOC_P(prec, TDB_DATA)) == NULL ) {
- return NULL;
- }
-
- snprintf( key_string, sizeof(key_string), "%s/%d/%d",
- prec->name, procid_to_pid(&prec->pid), prec->pnum );
-
- *kbuf = string_term_tdb_data(talloc_strdup(prec, key_string));
- if (kbuf->dptr == NULL )
- return NULL;
-
- return kbuf;
-}
-
-/*********************************************************************
-*********************************************************************/
-
-static void fill_pipe_open_rec( struct pipe_open_rec *prec, smb_np_struct *p )
-{
- prec->pid = pid_to_procid(sys_getpid());
- prec->pnum = p->pnum;
- prec->uid = geteuid();
- fstrcpy( prec->name, p->name );
-
- return;
-}
-
-/*********************************************************************
-*********************************************************************/
-
-bool store_pipe_opendb( smb_np_struct *p )
-{
- struct db_record *dbrec;
- struct pipe_open_rec *prec;
- TDB_DATA *key;
- TDB_DATA data;
- bool ret = False;
-
- if ( (prec = TALLOC_P( talloc_tos(), struct pipe_open_rec)) == NULL ) {
- DEBUG(0,("store_pipe_opendb: talloc failed!\n"));
- return False;
- }
-
- fill_pipe_open_rec( prec, p );
- if ( (key = make_pipe_rec_key( prec )) == NULL ) {
- goto done;
- }
-
- data.dptr = (uint8 *)prec;
- data.dsize = sizeof(struct pipe_open_rec);
-
- if (!(dbrec = connections_fetch_record(prec, *key))) {
- DEBUG(0, ("connections_fetch_record failed\n"));
- goto done;
- }
-
- ret = NT_STATUS_IS_OK(dbrec->store(dbrec, data, TDB_REPLACE));
-
-done:
- TALLOC_FREE( prec );
- return ret;
-}
-
-/*********************************************************************
-*********************************************************************/
-
-bool delete_pipe_opendb( smb_np_struct *p )
-{
- struct db_record *dbrec;
- struct pipe_open_rec *prec;
- TDB_DATA *key;
- bool ret = False;
-
- if ( (prec = TALLOC_P( talloc_tos(), struct pipe_open_rec)) == NULL ) {
- DEBUG(0,("store_pipe_opendb: talloc failed!\n"));
- return False;
- }
-
- fill_pipe_open_rec( prec, p );
- if ( (key = make_pipe_rec_key( prec )) == NULL ) {
- goto done;
- }
-
- if (!(dbrec = connections_fetch_record(prec, *key))) {
- DEBUG(0, ("connections_fetch_record failed\n"));
- goto done;
- }
-
- ret = NT_STATUS_IS_OK(dbrec->delete_rec(dbrec));
-
-done:
- TALLOC_FREE( prec );
- return ret;
-}