OpenVAS Libraries  9.0.3
smb_interface_stub.c File Reference

Stub implementatin for SMB interface. More...

#include <string.h>
#include "openvas_smb_interface.h"
Include dependency graph for smb_interface_stub.c:

Go to the source code of this file.

Functions

char * smb_versioninfo ()
 Return version info for SMB implementation. More...
 
int smb_connect (const char *server, const char *share, const char *username, const char *password, SMB_HANDLE *con)
 Establish connection to a SMB service. More...
 
int smb_close (SMB_HANDLE handle)
 Close the connection handle for SMB service. More...
 
char * smb_file_SDDL (SMB_HANDLE handle, const char *filename)
 Obtain Windows file rights in SDDL format. More...
 
char * smb_file_OwnerSID (SMB_HANDLE handle, const char *filename)
 Obtain the SID of the Owner for a given file/path. More...
 
char * smb_file_GroupSID (SMB_HANDLE handle, const char *filename)
 Obtain the SID of the Group for a given file/path. More...
 
char * smb_file_TrusteeRights (SMB_HANDLE handle, const char *filename)
 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

Stub implementatin for SMB interface.

This file contains an empty implementation that fulfills the SMB interface specfified in openvas_smb_interface.h

Definition in file smb_interface_stub.c.

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 87 of file smb_interface_stub.c.

Referenced by nasl_smb_close().

88 {
89  (void) handle;
90  return -1;
91 }
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 68 of file smb_interface_stub.c.

Referenced by nasl_smb_connect().

71 {
72  (void) server;
73  (void) share;
74  (void) username;
75  (void) password;
76  (void) con;
77  return -1;
78 }
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 135 of file smb_interface_stub.c.

Referenced by nasl_smb_file_group_sid().

136 {
137  (void) handle;
138  (void) filename;
139  return NULL;
140 }
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 118 of file smb_interface_stub.c.

Referenced by nasl_smb_file_owner_sid().

119 {
120  (void) handle;
121  (void) filename;
122  return NULL;
123 }
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 102 of file smb_interface_stub.c.

Referenced by nasl_smb_file_SDDL().

103 {
104  (void) handle;
105  (void) filename;
106  return NULL;
107 }
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 151 of file smb_interface_stub.c.

Referenced by nasl_smb_file_trustee_rights().

152 {
153  (void) handle;
154  (void) filename;
155  return NULL;
156 }
Here is the caller graph for this function:

◆ smb_versioninfo()

char* smb_versioninfo ( void  )

Return version info for SMB implementation.

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

Definition at line 48 of file smb_interface_stub.c.

Referenced by nasl_smb_versioninfo().

49 {
50  return NULL;
51 }
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 168 of file smb_interface_stub.c.

Referenced by nasl_win_cmd_exec().

169 {
170  (void) argc;
171  (void) argv;
172  (void) res;
173  return -1;
174 }
Here is the caller graph for this function: