OpenVAS Scanner  7.0.0~git
openvas_smb_interface.h File Reference

API protos describing the interface of a smb interface implementation. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef long int SMB_HANDLE
 

Functions

char * smb_versioninfo (void)
 Return version info for SMB implementation. More...
 
int smb_connect (const char *, const char *, const char *, const char *, SMB_HANDLE *)
 Establish connection to a SMB service. More...
 
int smb_close (SMB_HANDLE)
 Close the connection handle for SMB service. More...
 
char * smb_file_SDDL (SMB_HANDLE, const char *)
 Obtain Windows file rights in SDDL format. More...
 
char * smb_file_OwnerSID (SMB_HANDLE, const char *)
 Obtain the SID of the Owner for a given file/path. More...
 
char * smb_file_GroupSID (SMB_HANDLE, const char *)
 Obtain the SID of the Group for a given file/path. More...
 
char * smb_file_TrusteeRights (SMB_HANDLE, const char *)
 Obtain the Trustee SID and their rights for a given file/path. More...
 
int wincmd (int argc, char *argv[], char **res)
 Command Execution in Windows. More...
 

Detailed Description

API protos describing the interface of a smb interface implementation.

This file contains API protos describing the interface of a smb interface implementation.

Definition in file openvas_smb_interface.h.

Typedef Documentation

◆ SMB_HANDLE

typedef long int SMB_HANDLE

Definition at line 31 of file openvas_smb_interface.h.

Function Documentation

◆ smb_close()

int smb_close ( SMB_HANDLE  handle)

Close the connection handle for SMB service.

Parameters
[in]handle- SMB connection handle
Returns
, 0 on success, -1 on failure

Definition at line 81 of file smb_interface_stub.c.

82 {
83  (void) handle;
84  return -1;
85 }

Referenced by nasl_smb_close().

Here is the caller graph for this function:

◆ smb_connect()

int smb_connect ( const char *  server,
const char *  share,
const char *  username,
const char *  password,
SMB_HANDLE con 
)

Establish connection to a SMB service.

Parameters
[in]server- The host system to connect to
[in]share- The file system share.
[in]username- The username for getting access to SMB service
[in]password- The password that corresponds to username
[out]con- A connection handle in case of success.
Returns
, 0 on success, -1 on failure

Definition at line 62 of file smb_interface_stub.c.

64 {
65  (void) server;
66  (void) share;
67  (void) username;
68  (void) password;
69  (void) con;
70  return -1;
71 }

Referenced by nasl_smb_connect().

Here is the caller graph for this function:

◆ smb_file_GroupSID()

char* smb_file_GroupSID ( SMB_HANDLE  handle,
const char *  filename 
)

Obtain the SID of the Group for a given file/path.

Parameters
[in]handle- SMB connection handle
[in]filename- File system path
Returns
, Group SID string on success, NULL on failure.

Definition at line 131 of file smb_interface_stub.c.

132 {
133  (void) handle;
134  (void) filename;
135  return NULL;
136 }

Referenced by nasl_smb_file_group_sid().

Here is the caller graph for this function:

◆ smb_file_OwnerSID()

char* smb_file_OwnerSID ( SMB_HANDLE  handle,
const char *  filename 
)

Obtain the SID of the Owner for a given file/path.

Parameters
[in]handle- SMB connection handle
[in]filename- File system path
Returns
, Owner SID string on success, NULL on failure.

Definition at line 114 of file smb_interface_stub.c.

115 {
116  (void) handle;
117  (void) filename;
118  return NULL;
119 }

Referenced by nasl_smb_file_owner_sid().

Here is the caller graph for this function:

◆ smb_file_SDDL()

char* smb_file_SDDL ( SMB_HANDLE  handle,
const char *  filename 
)

Obtain Windows file rights in SDDL format.

Parameters
[in]handle- SMB connection handle
[in]filename- File system path
Returns
, Security Descriptor in SDDL format on success, NULL on failure.

Definition at line 97 of file smb_interface_stub.c.

98 {
99  (void) handle;
100  (void) filename;
101  return NULL;
102 }

Referenced by nasl_smb_file_SDDL().

Here is the caller graph for this function:

◆ smb_file_TrusteeRights()

char* smb_file_TrusteeRights ( SMB_HANDLE  handle,
const char *  filename 
)

Obtain the Trustee SID and their rights for a given file/path.

Parameters
[in]handle- SMB connection handle
[in]filename- File system path
Returns
, Trustee SID:Access_Mask string on success, NULL on failure.

Definition at line 148 of file smb_interface_stub.c.

149 {
150  (void) handle;
151  (void) filename;
152  return NULL;
153 }

Referenced by nasl_smb_file_trustee_rights().

Here is the caller graph for this function:

◆ smb_versioninfo()

char* smb_versioninfo ( )

Return version info for SMB implementation.

Returns
NULL if this the implementation is a non-functional stub, else a arbitrary string that explains the version of the implementation.

Definition at line 41 of file smb_interface_stub.c.

42 {
43  return NULL;
44 }

Referenced by nasl_smb_versioninfo().

Here is the caller graph for this function:

◆ wincmd()

int wincmd ( int  argc,
char *  argv[],
char **  res 
)

Command Execution in Windows.

Parameters
[in]argc- Connection strings
[in]argv- Number of arguments
Returns
, 0 on success, -1 on failure

Definition at line 165 of file smb_interface_stub.c.

166 {
167  (void) argc;
168  (void) argv;
169  (void) res;
170  return -1;
171 }