]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Simplified MSNT basic auth helper
authorFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 30 Dec 2014 07:46:14 +0000 (08:46 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 30 Dec 2014 07:46:14 +0000 (08:46 +0100)
1  2 
helpers/basic_auth/MSNT/msntauth.cc
helpers/basic_auth/MSNT/msntauth.h
helpers/basic_auth/MSNT/valid.cc
helpers/basic_auth/MSNT/valid.h
helpers/basic_auth/SSPI/valid.h
lib/smblib/smblib.c
lib/smblib/smblib.h

Simple merge
Simple merge
Simple merge
index 73dca1c67603108349b08326b20284ae0132497b,40ca4820a5c87df879c26622e3f6cc3bfd9fb7a5..7db537ba8bea730b6997aec9e969d512ef41ba44
@@@ -15,7 -15,6 +15,7 @@@
  #define NTV_PROTOCOL_ERROR 2
  #define NTV_LOGON_ERROR 3
  
- int Valid_User(char *USERNAME, char *PASSWORD, char *SERVER, char *BACKUP, char *DOMAIN);
+ int Valid_User(char *USERNAME, char *PASSWORD, const char *SERVER, char *BACKUP, const char *DOMAIN);
  
  #endif
 +
index b785ffecdd4fe120b19b533c23fd856e116966de,5ace2792defd3b39d0e578754d76eaaa6d86a9fd..909b203832df805069db0f6014bf06d3472e8b06
@@@ -91,7 -91,4 +91,5 @@@ debug(char *format,...
  }
  #endif /* __GNUC__ */
  
- int Valid_User(char *,char *, char *);
  #endif
 +
Simple merge
index 68e4a559b7a89e153441cac07187285d04230c28,d4ce2b82531c9eaa96e3a72826b4bb20218b855d..8de2ade9ffd819e5c05ce217ee5811368fc946a9
  extern "C" {
  #endif
  
 -    /* Just define all the entry points */
 +/* Just define all the entry points */
  
 -    /* Create a handle to allow us to set/override some parameters ...       */
 +/* Create a handle to allow us to set/override some parameters ...       */
  
 -    SMB_Handle_Type SMB_Create_Con_Handle(void);
 +SMB_Handle_Type SMB_Create_Con_Handle(void);
  
 -    /* Connect to a server, but do not do a tree con etc ... */
 +/* Connect to a server, but do not do a tree con etc ... */
  
 -    SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type Con_Handle,
 -                                       const char *server,
 -                                       const char *NTdomain);
 +SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type Con_Handle,
-                                    char *server,
++                                   const char *server,
 +                                   const char *NTdomain);
  
 -    /* Connect to a server and give us back a handle. If Con == NULL, create */
 -    /* The handle and populate it with defaults                              */
 +/* Connect to a server and give us back a handle. If Con == NULL, create */
 +/* The handle and populate it with defaults                              */
  
 -    SMB_Handle_Type SMB_Connect(SMB_Handle_Type Con_Handle,
 -                                SMB_Tree_Handle *tree,
 -                                char *service,
 -                                char *username,
 -                                char *password);
 +SMB_Handle_Type SMB_Connect(SMB_Handle_Type Con_Handle,
 +                            SMB_Tree_Handle *tree,
 +                            char *service,
 +                            char *username,
 +                            char *password);
  
 -    int SMB_Init(void);
 +int SMB_Init(void);
  
 -    int SMB_Logon_Server(SMB_Handle_Type Con_Handle,
 -                         char *UserName,
 -                         char *PassWord,
 -                         const char *NtDomain,
 -                         int PreCrypted);
 +int SMB_Logon_Server(SMB_Handle_Type Con_Handle,
 +                     char *UserName,
 +                     char *PassWord,
 +                     const char *NtDomain,
 +                     int PreCrypted);
  
 -    /* Negotiate a protocol                                                  */
 +/* Negotiate a protocol                                                  */
  
 -    int SMB_Negotiate(SMB_Handle_Type Con_Handle, const char *Prots[]);
 +int SMB_Negotiate(SMB_Handle_Type Con_Handle, const char *Prots[]);
  
 -    /* Connect to a tree ...                                                 */
 +/* Connect to a tree ...                                                 */
  
 -    SMB_Tree_Handle SMB_TreeConnect(SMB_Handle_Type con,
 -                                    SMB_Tree_Handle tree,
 -                                    const char *path,
 -                                    const char *password,
 -                                    const char *dev);
 +SMB_Tree_Handle SMB_TreeConnect(SMB_Handle_Type con,
 +                                SMB_Tree_Handle tree,
 +                                const char *path,
 +                                const char *password,
 +                                const char *dev);
  
 -    /* Disconnect a tree ...                                                 */
 +/* Disconnect a tree ...                                                 */
  
 -    int SMB_TreeDisconect(void *tree_handle);
 +int SMB_TreeDisconect(void *tree_handle);
  
 -    /* Open a file                                                           */
 +/* Open a file                                                           */
  
 -    void *SMB_Open(void *tree_handle,
 -                   void *file_handle,
 -                   char *file_name,
 -                   unsigned short mode,
 -                   unsigned short search);
 +void *SMB_Open(void *tree_handle,
 +               void *file_handle,
 +               char *file_name,
 +               unsigned short mode,
 +               unsigned short search);
  
 -    /* Close a file                                                          */
 +/* Close a file                                                          */
  
 -    int SMB_Close(void *file_handle);
 +int SMB_Close(void *file_handle);
  
 -    /* Disconnect from server. Has flag to specify whether or not we keep the */
 -    /* handle.                                                                */
 +/* Disconnect from server. Has flag to specify whether or not we keep the */
 +/* handle.                                                                */
  
 -    int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle);
 +int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle);
  
 -    void *SMB_Create(void *Tree_Handle,
 -                     void *File_Handle,
 -                     char *file_name,
 -                     short search);
 +void *SMB_Create(void *Tree_Handle,
 +                 void *File_Handle,
 +                 char *file_name,
 +                 short search);
  
 -    int SMB_Delete(void *tree, char *file_name, short search);
 +int SMB_Delete(void *tree, char *file_name, short search);
  
 -    int SMB_Create_Dir(void *tree, char *dir_name);
 +int SMB_Create_Dir(void *tree, char *dir_name);
  
 -    int SMB_Delete_Dir(void *tree, char *dir_name);
 +int SMB_Delete_Dir(void *tree, char *dir_name);
  
 -    int SMB_Check_Dir(void *tree, char *dir_name);
 +int SMB_Check_Dir(void *tree, char *dir_name);
  
 -    int SMB_Get_Last_Error(void);
 +int SMB_Get_Last_Error(void);
  
 -    int SMB_Get_Last_SMB_Err(void);
 +int SMB_Get_Last_SMB_Err(void);
  
 -    void SMB_Get_Error_Msg(int msg, char *msgbuf, int len);
 +void SMB_Get_Error_Msg(int msg, char *msgbuf, int len);
  
 -    void *SMB_Logon_And_TCon(void *con, void *tree, char *user, char *pass,
 -                             char *service, char *st);
 +void *SMB_Logon_And_TCon(void *con, void *tree, char *user, char *pass,
 +                         char *service, char *st);
  
  #ifdef __cplusplus
  }