OpenVAS Libraries  4.0+rc3.SVN
Functions
nasl/nasl_smb.h File Reference

Protos for NASL SMB API. More...

#include "nasl_lex_ctxt.h"
#include "nasl_tree.h"

Go to the source code of this file.

Functions

tree_cellnasl_smb_versioninfo (lex_ctxt *lexic)
 Get a version string of the SMB implementation.
tree_cellnasl_smb_connect (lex_ctxt *lexic)
 Connect to SMB service and return a handle for it.
tree_cellnasl_smb_close (lex_ctxt *lexic)
 Close SMB service handle.
tree_cellnasl_smb_file_SDDL (lex_ctxt *lexic)
 Obtain Security Descriptor in SDDL format.
tree_cellnasl_smb_file_owner_sid (lex_ctxt *lexic)
 Obtain File Owner SID.
tree_cellnasl_smb_file_group_sid (lex_ctxt *lexic)
 Obtain File Group SID.
tree_cellnasl_smb_file_trustee_rights (lex_ctxt *lexic)
 Obtain File Trustee SID with Access Mask.

Detailed Description

Protos for NASL SMB API.

This file contains the protos for nasl_smb.c


Function Documentation

tree_cell* nasl_smb_close ( lex_ctxt lexic)

Close SMB service handle.

Parameters:
[in]lexicLexical context of NASL interpreter.
Returns:
NULL in case of a serious problem. Else returns a treecell with integer == 1.

Retrieves local variable "smb_handle" from the lexical context and closes the respective handle.

tree_cell* nasl_smb_connect ( lex_ctxt lexic)

Connect to SMB service and return a handle for it.

Parameters:
[in]lexicLexical context of NASL interpreter.
Returns:
NULL in case the connection could not be established. Else a tree_cell with the handle.

Retrieves local variables "host", "username", "password" and "share" from the lexical context, performs and connects to this given SMB service returning a handle for the service as integer.

tree_cell* nasl_smb_file_group_sid ( lex_ctxt lexic)

Obtain File Group SID.

Parameters:
[in]lexicLexical context of NASL interpreter.
Returns:
NULL in case of problem. Else returns a treecell with Group SID string

Retrieves local variable "smb_handle" and "filename" from the lexical context and perform file rights query.

tree_cell* nasl_smb_file_owner_sid ( lex_ctxt lexic)

Obtain File Owner SID.

Parameters:
[in]lexicLexical context of NASL interpreter.
Returns:
NULL in case of problem. Else returns a treecell with Owner SID string

Retrieves local variable "smb_handle" and "filename" from the lexical context and perform file rights query.

tree_cell* nasl_smb_file_SDDL ( lex_ctxt lexic)

Obtain Security Descriptor in SDDL format.

Parameters:
[in]lexicLexical context of NASL interpreter.
Returns:
NULL in case of problem. Else returns a treecell with SDDL string

Retrieves local variable "smb_handle" and "filename" from the lexical context and perform file rights query.

tree_cell* nasl_smb_file_trustee_rights ( lex_ctxt lexic)

Obtain File Trustee SID with Access Mask.

Parameters:
[in]lexicLexical context of NASL interpreter.
Returns:
NULL in case of problem. Else returns a treecell with Trustee SID and Access Mask string

Retrieves local variable "smb_handle" and "filename" from the lexical context and perform file rights query.

tree_cell* nasl_smb_versioninfo ( lex_ctxt lexic)

Get a version string of the SMB implementation.

Todo:
Check for memleak and document reference counting in tree cells. In some cases, after a tree_cell (typically retc) has been allocated with alloc_tree_cell, it is not later freed or deref_tree_cell'ed. It has to evaluated if that is okay or leads to memory leaks.
Parameters:
[in]lexicLexical context of NASL interpreter.
Returns:
NULL in case no implementation is present. Else a tree_cell with the version as string.