From 1183a1729e57cb67a6fb05487e5aa0f23048a8e9 Mon Sep 17 00:00:00 2001 From: franklahm Date: Fri, 27 Nov 2009 15:50:26 +0000 Subject: [PATCH] Untabify and reindent --- contrib/acltests/uuidtest.c | 92 ++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/contrib/acltests/uuidtest.c b/contrib/acltests/uuidtest.c index 1444962a..429f4b59 100644 --- a/contrib/acltests/uuidtest.c +++ b/contrib/acltests/uuidtest.c @@ -1,16 +1,16 @@ /* - $Id: uuidtest.c,v 1.3 2009-11-20 17:45:46 franklahm Exp $ - Copyright (c) 2008,2009 Frank Lahm + $Id: uuidtest.c,v 1.4 2009-11-27 15:50:26 franklahm Exp $ + Copyright (c) 2008,2009 Frank Lahm - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. */ #ifdef HAVE_CONFIG_H @@ -39,59 +39,59 @@ int main( int argc, char **argv) char *name = NULL; if (argc < 2) { - printf("Usage: uuidtest | -u [ ... | -u ...] \n"); - return -1; + printf("Usage: uuidtest | -u [ ... | -u ...] \n"); + return -1; } - + /* Parse afp_ldap.conf */ printf("Start parsing afp_ldap.conf\n"); acl_ldap_readconfig(_PATH_ACL_LDAPCONF); printf("Finished parsing afp_ldap.conf\n"); if (ldap_config_valid) { - if (ldap_auth_method == LDAP_AUTH_NONE) - printf("afp_ldap.conf is ok. Using anonymous bind.\n"); - else if (ldap_auth_method == LDAP_AUTH_SIMPLE) - printf("afp_ldap.conf is ok. Using simple bind.\n"); - else { - ldap_config_valid = 0; - printf("afp_ldap.conf want SASL which is not yet supported.\n"); - } + if (ldap_auth_method == LDAP_AUTH_NONE) + printf("afp_ldap.conf is ok. Using anonymous bind.\n"); + else if (ldap_auth_method == LDAP_AUTH_SIMPLE) + printf("afp_ldap.conf is ok. Using simple bind.\n"); + else { + ldap_config_valid = 0; + printf("afp_ldap.conf want SASL which is not yet supported.\n"); + } } else { - printf("afp_ldap.conf is not ok.\n"); - return 1; + printf("afp_ldap.conf is not ok.\n"); + return 1; } for (i=1; i+1 <= argc; i++) { - if (STRNCMP("-u", == , argv[i], 2)) { - printf("Searching uuid: %s\n", argv[i]+2); - uuid_string2bin(argv[i]+2, uuid); + if (STRNCMP("-u", == , argv[i], 2)) { + printf("Searching uuid: %s\n", argv[i]+2); + uuid_string2bin(argv[i]+2, uuid); ret = getnamefromuuid( uuid, &name, &type); if (ret == 0) { printf("Got user: %s for uuid: %s, type:%d\n", name, argv[i]+2, type); free(uuidstring); } else printf("uuid %s not found.\n", argv[i]+2); - } else { - printf("Searching user: %s\n", argv[i]); - ret = getuuidfromname( argv[i], UUID_USER, uuid); - if (ret == 0) { - uuid_bin2string( uuid, &uuidstring); - printf("Got uuid: %s for name: %s, type: USER\n", uuidstring, argv[i]); - free(uuidstring); - } else { - ret = getuuidfromname( argv[i], UUID_GROUP, uuid); - if (ret == 0) { - uuid_bin2string( uuid, &uuidstring); - printf("Got uuid: %s for name: %s, type: GROUP\n", uuidstring, argv[i]); - free(uuidstring); - } - else - printf("User %s not found.\n", argv[i]); - } - } + } else { + printf("Searching user: %s\n", argv[i]); + ret = getuuidfromname( argv[i], UUID_USER, uuid); + if (ret == 0) { + uuid_bin2string( uuid, &uuidstring); + printf("Got uuid: %s for name: %s, type: USER\n", uuidstring, argv[i]); + free(uuidstring); + } else { + ret = getuuidfromname( argv[i], UUID_GROUP, uuid); + if (ret == 0) { + uuid_bin2string( uuid, &uuidstring); + printf("Got uuid: %s for name: %s, type: GROUP\n", uuidstring, argv[i]); + free(uuidstring); + } + else + printf("User %s not found.\n", argv[i]); + } + } } return 0; } -#endif /* HAVE_NFSv4_ACLS */ +#endif /* HAVE_NFSv4_ACLS */ -- 2.39.2