]> arthur.barton.de Git - netatalk.git/commitdiff
Head <-> 1.6 patch reduction.
authorsrittau <srittau>
Mon, 9 Jun 2003 15:09:19 +0000 (15:09 +0000)
committersrittau <srittau>
Mon, 9 Jun 2003 15:09:19 +0000 (15:09 +0000)
etc/afpd/afp_dsi.c
etc/afpd/afp_options.c
etc/afpd/appl.c
etc/afpd/auth.c

index 8d09e1902ed3d93547920984e5ca367116e0a3ff..e9442bdb93fb8177f419f072d4cdc5078753fb67 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_dsi.c,v 1.29 2003-06-06 19:41:48 srittau Exp $
+ * $Id: afp_dsi.c,v 1.30 2003-06-09 15:09:19 srittau Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -116,6 +116,7 @@ static void afp_dsi_timedown()
         LOG(log_error, logtype_afpd, "afp_timedown: setitimer: %s", strerror(errno) );
         afp_dsi_die(1);
     }
+
     memset(&sv, 0, sizeof(sv));
     sv.sa_handler = afp_dsi_die;
     sigemptyset( &sv.sa_mask );
@@ -148,7 +149,8 @@ static void afp_dsi_getmesg (int sig)
 
 static void alarm_handler()
 {
-int err;
+    int err;
+
     /* if we're in the midst of processing something,
        don't die. */
     if ((child.flags & CHILD_SLEEPING) && child.tickle++ < child.obj->options.sleep) {
@@ -266,6 +268,7 @@ void afp_over_dsi(AFPObj *obj)
         } else if (!(child.flags & CHILD_DIE)) { /* reset tickle timer */
             setitimer(ITIMER_REAL, &dsi->timer, NULL);
         }
+
         switch(cmd) {
         case DSIFUNC_CLOSE:
             afp_dsi_close(obj);
index 69ea78b3d237cf57b43d78d30eb3e50d8daad7a6..9813fe3a87ba0a42ce8f1a25d13c396cf45e8b2e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_options.c,v 1.31 2003-05-16 15:29:26 didg Exp $
+ * $Id: afp_options.c,v 1.32 2003-06-09 15:09:19 srittau Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -123,11 +123,11 @@ void afp_options_free(struct afp_options *opt,
     if (opt->passwdfile && (opt->passwdfile != save->passwdfile))
         free(opt->passwdfile);
     if (opt->signature && (opt->signature != save->signature))
-       free(opt->signature);
+        free(opt->signature);
     if (opt->k5service && (opt->k5service != save->k5service))
-       free(opt->k5service);
+        free(opt->k5service);
     if (opt->k5realm && (opt->k5realm != save->k5realm))
-       free(opt->k5realm);
+        free(opt->k5realm);
 }
 
 /* initialize options */
@@ -269,12 +269,15 @@ int afp_options_parseline(char *buf, struct afp_options *options)
     /* -[no]setuplog <logtype> <loglevel> [<filename>]*/
     if ((c = getoption(buf, "-setuplog")))
     {
-      char *ptr, *logsource, *logtype, *loglevel, *filename;
+      char *ptr, *logtype, *loglevel, *filename;
+#if 0
+      char *logsource;
+#endif
 
       LOG(log_debug6, logtype_afpd, "setting up logtype, c is %s", c);
       ptr = c;
-      
-      /* 
+
+#if 0
       logsource = ptr = c;
       if (ptr)
       {
@@ -286,7 +289,7 @@ int afp_options_parseline(char *buf, struct afp_options *options)
             ptr++;
         }
       }
-      */
+#endif
 
       logtype = ptr; 
       if (ptr)
@@ -389,11 +392,11 @@ int afp_options_parseline(char *buf, struct afp_options *options)
 #endif /* ADMIN_GRP */
 
     if ((c = getoption(buf, "-k5service")) && (opt = strdup(c)))
-       options->k5service = opt;
+        options->k5service = opt;
     if ((c = getoption(buf, "-k5realm")) && (opt = strdup(c)))
-       options->k5realm = opt;
+        options->k5realm = opt;
     if ((c = getoption(buf, "-k5keytab")))
-       setenv( "KRB5_KTNAME", c, 1 );
+        setenv( "KRB5_KTNAME", c, 1 );
     if ((c = getoption(buf, "-authprintdir")) && (opt = strdup(c)))
         options->authprintdir = opt;
     if ((c = getoption(buf, "-uampath")) && (opt = strdup(c)))
index 2bb23e13aec95d247895750c95dee4cd8c230e7c..7eb6880dc724e0b51ec5dcafe1b77266fa61f65c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: appl.c,v 1.13 2003-05-03 20:03:12 didg Exp $
+ * $Id: appl.c,v 1.14 2003-06-09 15:09:19 srittau Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -330,7 +330,7 @@ int         ibuflen, *rbuflen;
     u_char             appltag[ 4 ];
     char                *buf, *cbuf;
     struct path         *path;
-    
+
     ibuf += 2;
 
     memcpy( &vid, ibuf, sizeof( vid ));
index 2991f0391c18356162e09f17fa5b9d9670f6d095..4058741d4eaca4b5acffc9378575e5b96f737d4c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: auth.c,v 1.46 2003-05-16 15:29:26 didg Exp $
+ * $Id: auth.c,v 1.47 2003-06-09 15:09:19 srittau Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -273,6 +273,7 @@ static int login(AFPObj *obj, struct passwd *pwd, void (*logout)(void))
 
         LOG(log_info, logtype_afpd, "session from %s (%s)", hostname,
             inet_ntoa( dsi->client.sin_addr ) );
+
         if (setegid( pwd->pw_gid ) < 0 || seteuid( pwd->pw_uid ) < 0) {
             LOG(log_error, logtype_afpd, "login: %s", strerror(errno) );
             return AFPERR_BADUAM;