--------------------- PatchSet 3034 Date: 2001/09/16 08:53:21 Author: serassio Branch: nt-2_3-tolsty Tag: (none) Log: Fixed indent problems Members: auth_modules/LDAP/squid_ldap_auth.c:1.1.1.1.56.1.2.1->1.1.1.1.56.1.2.2 auth_modules/NCSA/ncsa_auth.c:1.1.1.1.66.1.2.1->1.1.1.1.66.1.2.2 auth_modules/NT/valid.h:1.1.2.1.2.1->1.1.2.1.2.2 Index: squid/auth_modules/LDAP/squid_ldap_auth.c =================================================================== RCS file: /cvsroot/squid-sf//squid/auth_modules/LDAP/Attic/squid_ldap_auth.c,v retrieving revision 1.1.1.1.56.1.2.1 retrieving revision 1.1.1.1.56.1.2.2 diff -u -r1.1.1.1.56.1.2.1 -r1.1.1.1.56.1.2.2 --- squid/auth_modules/LDAP/squid_ldap_auth.c 27 Aug 2001 21:48:15 -0000 1.1.1.1.56.1.2.1 +++ squid/auth_modules/LDAP/squid_ldap_auth.c 16 Sep 2001 08:53:21 -0000 1.1.1.1.56.1.2.2 @@ -29,13 +29,11 @@ #include #endif -typedef struct -{ +typedef struct { void *data; acl_proxy_auth_user *auth_user; RH *handler; -} -authenticateStateData; +} authenticateStateData; /* Change this to your search base */ @@ -43,8 +41,7 @@ int checkLDAP(LDAP * ld, char *userid, char *password); -int -main(int argc, char **argv) +int main(int argc, char **argv) { char buf[256]; char *username, *password, *p; @@ -53,20 +50,23 @@ setbuf(stdout, NULL); - if (argc != 2) { + if (argc != 2) + { fprintf(stderr, "Usage: squid_ldap_auth ldap_server_name\n"); exit(1); } ldapServer = (char *) argv[1]; - while (fgets(buf, 256, stdin) != NULL) { + while (fgets(buf, 256, stdin) != NULL) + { /* You can put this ldap connect outside the loop, but i didn't want to * have the connection open too much. If you have a site which will * be doing >1 authentication per second, you should move this (and the * below ldap_unbind()) outside the loop. */ - if ((ld = ldap_init(ldapServer, LDAP_PORT)) == NULL) { + if ((ld = ldap_init(ldapServer, LDAP_PORT)) == NULL) + { fprintf(stderr, "\nUnable to connect to LDAP server:%s port:%d\n", ldapServer, LDAP_PORT); exit(1); @@ -74,15 +74,18 @@ if ((p = strchr(buf, '\n')) != NULL) *p = '\0'; /* strip \n */ - if ((username = strtok(buf, " ")) == NULL) { + if ((username = strtok(buf, " ")) == NULL) + { printf("ERR\n"); continue; } - if ((password = strtok(NULL, "")) == NULL) { + if ((password = strtok(NULL, "")) == NULL) + { printf("ERR\n"); continue; } - if (checkLDAP(ld, username, password) != 0) { + if (checkLDAP(ld, username, password) != 0) + { printf("ERR\n"); continue; } else { @@ -92,8 +95,7 @@ } } -int -checkLDAP(LDAP * ld, char *userid, char *password) +int checkLDAP(LDAP * ld, char *userid, char *password) { char buffer[256]; Index: squid/auth_modules/NCSA/ncsa_auth.c =================================================================== RCS file: /cvsroot/squid-sf//squid/auth_modules/NCSA/Attic/ncsa_auth.c,v retrieving revision 1.1.1.1.66.1.2.1 retrieving revision 1.1.1.1.66.1.2.2 diff -u -r1.1.1.1.66.1.2.1 -r1.1.1.1.66.1.2.2 --- squid/auth_modules/NCSA/ncsa_auth.c 27 Aug 2001 21:48:15 -0000 1.1.1.1.66.1.2.1 +++ squid/auth_modules/NCSA/ncsa_auth.c 16 Sep 2001 08:53:22 -0000 1.1.1.1.66.1.2.2 @@ -46,14 +46,12 @@ static hash_table *hash = NULL; static HASHFREE my_free; -typedef struct _user_data -{ +typedef struct _user_data { /* first two items must be same as hash_link */ char *user; struct _user_data *next; char *passwd; -} -user_data; +} user_data; static void my_free(void *p) @@ -107,7 +105,8 @@ char *user, *passwd, *p; user_data *u; setbuf(stdout, NULL); - if (argc != 2) { + if (argc != 2) + { fprintf(stderr, "Usage: ncsa_auth \n"); exit(1); } Index: squid/auth_modules/NT/valid.h =================================================================== RCS file: /cvsroot/squid-sf//squid/auth_modules/NT/Attic/valid.h,v retrieving revision 1.1.2.1.2.1 retrieving revision 1.1.2.1.2.2 diff -u -r1.1.2.1.2.1 -r1.1.2.1.2.2 --- squid/auth_modules/NT/valid.h 27 Aug 2001 21:48:15 -0000 1.1.2.1.2.1 +++ squid/auth_modules/NT/valid.h 16 Sep 2001 08:53:22 -0000 1.1.2.1.2.2 @@ -11,6 +11,6 @@ #define LOGON32_LOGON_NETWORK 3 #endif -int Valid_User(char *, char *, char *); +int Valid_User(char *,char *, char *); #endif