"Fossies" - the Fresh Open Source Software Archive

Member "coda-6.9.5/coda-src/auth2/cunlog.c" (17 Dec 2007, 2072 Bytes) of package /linux/misc/old/coda-6.9.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "cunlog.c" see the Fossies "Dox" file reference documentation.

    1 /* BLURB gpl
    2 
    3                            Coda File System
    4                               Release 6
    5 
    6           Copyright (c) 1987-2003 Carnegie Mellon University
    7                   Additional copyrights listed below
    8 
    9 This  code  is  distributed "AS IS" without warranty of any kind under
   10 the terms of the GNU General Public Licence Version 2, as shown in the
   11 file  LICENSE.  The  technical and financial  contributors to Coda are
   12 listed in the file CREDITS.
   13 
   14                         Additional copyrights
   15 
   16 #*/
   17 
   18 /*
   19                          IBM COPYRIGHT NOTICE
   20 
   21                           Copyright (C) 1986
   22              International Business Machines Corporation
   23                          All Rights Reserved
   24 
   25 This  file  contains  some  code identical to or derived from the 1986
   26 version of the Andrew File System ("AFS"), which is owned by  the  IBM
   27 Corporation.   This  code is provided "AS IS" and IBM does not warrant
   28 that it is free of infringement of  any  intellectual  rights  of  any
   29 third  party.    IBM  disclaims  liability of any kind for any damages
   30 whatsoever resulting directly or indirectly from use of this  software
   31 or  of  any  derivative work.  Carnegie Mellon University has obtained
   32 permission to  modify,  distribute and sublicense this code,  which is
   33 based on Version 2  of  AFS  and  does  not  contain  the features and
   34 enhancements that are part of  Version 3 of  AFS.  Version 3 of AFS is
   35 commercially   available   and  supported  by   Transarc  Corporation,
   36 Pittsburgh, PA.
   37 
   38 */
   39 
   40 /*
   41     cunlog -- tell Venus to clean up your connecion
   42 
   43 */
   44 
   45 #ifdef __cplusplus
   46 extern "C" {
   47 #endif
   48 
   49 #include <unistd.h>
   50 #include <stdlib.h>
   51 #include <auth2.h>
   52 #include "avenus.h"
   53 #include "parse_realms.h"
   54 #include "codaconf.h"
   55 
   56 #ifdef __cplusplus
   57 }
   58 #endif
   59 
   60 
   61 int main(int argc, char **argv)
   62 {
   63     const char *realm = "", *p = NULL;
   64 
   65     if (argc == 2) {
   66     SplitRealmFromName(argv[1], &p);
   67     if (p) realm = p;
   68     }
   69 
   70     codaconf_init("venus.conf");
   71     codaconf_init("auth2.conf");
   72     CODACONF_STR(realm, "realm", NULL);
   73 
   74     U_DeleteLocalTokens(realm);
   75     exit(0);
   76 }