]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - lib/smblib/smblib-api.c
Source Format Enforcement (#1234)
[thirdparty/squid.git] / lib / smblib / smblib-api.c
index 9604daee2f04af02f4a286f12edfe28da0a1830c..79c4fa350e780d6effe65a412010e994e94188be 100644 (file)
@@ -1,11 +1,17 @@
-#include "squid.h"
+/*
+ * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
 /* UNIX SMBlib NetBIOS implementation
 
    Version 1.0
    SMB API Calls ...
 
    Copyright (C) Richard Sharpe 1996
-
 */
 
 /*
@@ -24,8 +30,9 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include "smblib/smblib-priv.h"
+#include "squid.h"
 #include "rfcnb/rfcnb.h"
+#include "smblib/smblib-priv.h"
 
 #if HAVE_STRING_H
 #include <string.h>
@@ -66,7 +73,6 @@ int SMBapi_NetUserPasswordSet(SMB_Tree_Handle tree, char *user,
         pad_api_name = TRUE;
     }
 
-
     pkt_len = pkt_len + param_len;
 
     /* Now allocate space for the packet, build it and send it */
@@ -106,7 +112,7 @@ int SMBapi_NetUserPasswordSet(SMB_Tree_Handle tree, char *user,
 
     SSVAL(SMB_Hdr(pkt), SMB_trans_len, param_len + strlen(SMB_LMAPI_SLOT) + 1);
 
-    p = SMB_Hdr(pkt) + SMB_trans_len + 2;  /* Skip the BCC and ect */
+    p = SMB_Hdr(pkt) + SMB_trans_len + 2;  /* Skip the BCC and etc */
 
     strcpy(p, SMB_LMAPI_SLOT);
     p = p + strlen(SMB_LMAPI_SLOT) + 1;
@@ -198,7 +204,6 @@ int SMBapi_NetUserPasswordSet(SMB_Tree_Handle tree, char *user,
 #define SMB_LMAPI_SUI_DESC "zWsTPWW"
 #define SMB_LMAPI_SUI_DATA_DESC "B16"
 
-
 /* Set user info ... specifically, password */
 
 int SMBapi_NetSetUserInfo(SMB_Tree_Handle tree, char *user,
@@ -279,7 +284,7 @@ int SMBapi_NetSetUserInfo(SMB_Tree_Handle tree, char *user,
     SSVAL(SMB_Hdr(pkt), SMB_trans_len, param_len + strlen(SMB_LMAPI_SLOT) +
           1 + data_len);
 
-    p = SMB_Hdr(pkt) + SMB_trans_len + 2;  /* Skip the BCC and ect */
+    p = SMB_Hdr(pkt) + SMB_trans_len + 2;  /* Skip the BCC and etc */
 
     strcpy(p, SMB_LMAPI_SLOT);
     p = p + strlen(SMB_LMAPI_SLOT) + 1;
@@ -287,7 +292,7 @@ int SMBapi_NetSetUserInfo(SMB_Tree_Handle tree, char *user,
     if (pad_api_name == TRUE)     /* Pad to a word boundary */
         p = p + 1;
 
-    /*  SSVAL(p, 0, 65000);  /* Check the result */
+    /*  SSVAL(p, 0, 65000); */ /* Check the result */
     SSVAL(p, 0, SMB_LMapi_SetUserInfo);  /* The api call */
 
     p = p + 2;
@@ -382,5 +387,5 @@ int SMBapi_NetShareEnum(SMB_Tree_Handle tree, char *enum_buf, int bufsiz,
 
 {
 
-
 }
+