]> arthur.barton.de Git - netatalk.git/commitdiff
Style police.
authorjmarcus <jmarcus>
Sat, 19 Jan 2002 21:29:54 +0000 (21:29 +0000)
committerjmarcus <jmarcus>
Sat, 19 Jan 2002 21:29:54 +0000 (21:29 +0000)
15 files changed:
etc/afpd/afp_asp.c
etc/afpd/afp_config.c
etc/afpd/afp_dsi.c
etc/afpd/afp_options.c
etc/afpd/afs.c
etc/afpd/auth.c
etc/afpd/directory.c
etc/afpd/filedir.c
etc/afpd/nfsquota.c
etc/afpd/ofork.c
etc/afpd/switch.c
etc/afpd/uam.c
etc/afpd/uid.c
etc/afpd/unix.c
etc/afpd/volume.c

index 55642c124f0d382ee663f826af63611ec2874e52..075147b277a93c7b67a840d3a44bb43cdbda1803 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_asp.c,v 1.9 2002-01-04 04:45:47 sibaz Exp $
+ * $Id: afp_asp.c,v 1.10 2002-01-19 21:29:54 jmarcus Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -51,7 +51,7 @@ static __inline__ void afp_asp_close(AFPObj *obj)
 
     asp_close( asp );
     LOG(log_info, logtype_default, "%.2fKB read, %.2fKB written",
-           asp->read_count / 1024.0, asp->write_count / 1024.0);
+        asp->read_count / 1024.0, asp->write_count / 1024.0);
 }
 
 static void afp_asp_die(const int sig)
@@ -129,11 +129,11 @@ void afp_over_asp(AFPObj *obj)
     }
 
     LOG(log_info, logtype_default, "session from %u.%u:%u on %u.%u:%u",
-            ntohs( asp->asp_sat.sat_addr.s_net ),
-            asp->asp_sat.sat_addr.s_node, asp->asp_sat.sat_port,
-            ntohs( atp_sockaddr( asp->asp_atp )->sat_addr.s_net ),
-            atp_sockaddr( asp->asp_atp )->sat_addr.s_node,
-            atp_sockaddr( asp->asp_atp )->sat_port );
+        ntohs( asp->asp_sat.sat_addr.s_net ),
+        asp->asp_sat.sat_addr.s_node, asp->asp_sat.sat_port,
+        ntohs( atp_sockaddr( asp->asp_atp )->sat_addr.s_net ),
+        atp_sockaddr( asp->asp_atp )->sat_addr.s_node,
+        atp_sockaddr( asp->asp_atp )->sat_port );
 
     while ((reply = asp_getrequest(asp))) {
         switch (reply) {
@@ -152,11 +152,11 @@ void afp_over_asp(AFPObj *obj)
                         LOG(log_info, logtype_default, "removed %s", addr_filename);
                     } else {
                         LOG(log_info, logtype_default, "error removing %s: %s",
-                               addr_filename, strerror(errno));
+                            addr_filename, strerror(errno));
                     }
                 } else {
                     LOG(log_info, logtype_default, "error stat'ing %s: %s",
-                           addr_filename, strerror(errno));
+                        addr_filename, strerror(errno));
                 }
             }
 
index ed6b42eba62e7bc3cbfb1550c2a31e246499cbb7..e13bbd7ab58c6581134197e25cbf8be67a66de54 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_config.c,v 1.14 2002-01-04 04:45:47 sibaz Exp $
+ * $Id: afp_config.c,v 1.15 2002-01-19 21:29:55 jmarcus Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
@@ -242,9 +242,9 @@ static AFPConfig *ASPConfigInit(const struct afp_options *options,
     }
 
     LOG(log_info, logtype_default, "%s:%s@%s started on %u.%u:%u (%s)", Obj, Type, Zone,
-            ntohs( atp_sockaddr( atp )->sat_addr.s_net ),
-            atp_sockaddr( atp )->sat_addr.s_node,
-            atp_sockaddr( atp )->sat_port, VERSION );
+        ntohs( atp_sockaddr( atp )->sat_addr.s_net ),
+        atp_sockaddr( atp )->sat_addr.s_node,
+        atp_sockaddr( atp )->sat_port, VERSION );
 
     config->fd = atp_fileno(atp);
     config->obj.handle = asp;
@@ -298,12 +298,12 @@ static AFPConfig *DSIConfigInit(const struct afp_options *options,
 
     if (options->flags & OPTION_PROXY) {
         LOG(log_info, logtype_default, "ASIP proxy initialized for %s:%d (%s)",
-               inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port),
-               VERSION);
+            inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port),
+            VERSION);
     } else {
         LOG(log_info, logtype_default, "ASIP started on %s:%d(%d) (%s)",
-               inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port),
-               dsi->serversock, VERSION);
+            inet_ntoa(dsi->server.sin_addr), ntohs(dsi->server.sin_port),
+            dsi->serversock, VERSION);
     }
 
 #ifdef USE_SRVLOC
index 20807e9775d833ad59856bb89fc0840969fc0616..b732e57c2654f26cabd3762d6e8b32af14edd37e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_dsi.c,v 1.17 2002-01-17 16:13:34 jmarcus Exp $
+ * $Id: afp_dsi.c,v 1.18 2002-01-19 21:29:55 jmarcus Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -61,7 +61,7 @@ static __inline__ void afp_dsi_close(AFPObj *obj)
     set_processname("afpd");
     syslog_setup(log_debug, logtype_default, logoption_ndelay | logoption_pid, logfacility_daemon);
     LOG(log_info, logtype_default, "%.2fKB read, %.2fKB written",
-           dsi->read_count/1024.0, dsi->write_count/1024.0);
+        dsi->read_count/1024.0, dsi->write_count/1024.0);
 
     dsi_close(dsi);
 }
@@ -72,7 +72,7 @@ static void afp_dsi_die(int sig)
     dsi_attention(child.obj->handle, AFPATTN_SHUTDOWN);
     afp_dsi_close(child.obj);
     if (sig) /* if no signal, assume dieing because logins are disabled &
-            don't log it (maintenance mode)*/
+                don't log it (maintenance mode)*/
         LOG(log_info, logtype_default, "Connection terminated");
     if (sig == SIGTERM || sig == SIGALRM) {
         exit( 0 );
index d63dc2b3c5c2a5f39ccc2faf63a6856e4f71bd94..375cfdf83b866cd87c73c9f4b5175adc2c6c4287 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afp_options.c,v 1.16 2002-01-04 04:45:47 sibaz Exp $
+ * $Id: afp_options.c,v 1.17 2002-01-19 21:29:55 jmarcus Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
@@ -226,16 +226,16 @@ int afp_options_parseline(char *buf, struct afp_options *options)
         options->loginmaxfail = atoi(c);
     if ((c = getoption(buf, "-tickleval"))) {
         options->tickleval = atoi(c);
-               if (options->tickleval <= 0) {
-                       options->tickleval = 30;
-               }
-       }
+        if (options->tickleval <= 0) {
+            options->tickleval = 30;
+        }
+    }
     if ((c = getoption(buf, "-timeout"))) {
         options->timeout = atoi(c);
-               if (options->timeout <= 0) {
-                       options->timeout = 4;
-               }
-       }
+        if (options->timeout <= 0) {
+            options->timeout = 4;
+        }
+    }
 
     if ((c = getoption(buf, "-server_quantum")))
         options->server_quantum = strtoul(c, NULL, 0);
index 8e7c05afff0d4f407d047511b22c41f2020df5e6..d7dd9c9f8fcc2caedd1f7612af212ae216336685 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: afs.c,v 1.8 2002-01-17 06:05:41 srittau Exp $
+ * $Id: afs.c,v 1.9 2002-01-19 21:29:55 jmarcus Exp $
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
@@ -286,7 +286,7 @@ int         ibuflen, *rbuflen;
     newpw[ len ] = '\0';
 
     LOG(log_info, logtype_default,
-            "changing password for <%s>.<%s>@<%s>", name, instance, realm );
+        "changing password for <%s>.<%s>@<%s>", name, instance, realm );
 
     ka_StringToKey( oldpw, realm, &oldkey );
     memset( oldpw, 0, sizeof( oldpw ));
index 7a814f407a05ea1f58cea987d24c7451a81332a6..2c892fb538116db6740dfa853f2707b16d1219b1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: auth.c,v 1.22 2002-01-04 04:45:47 sibaz Exp $
+ * $Id: auth.c,v 1.23 2002-01-19 21:29:55 jmarcus Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -164,7 +164,7 @@ static int login(AFPObj *obj, struct passwd *pwd, void (*logout)(void))
     }
 
     LOG(log_info, logtype_default, "login %s (uid %d, gid %d)", pwd->pw_name,
-            pwd->pw_uid, pwd->pw_gid );
+        pwd->pw_uid, pwd->pw_gid );
 
     if (obj->proto == AFPPROTO_ASP) {
         ASP asp = obj->handle;
@@ -180,7 +180,7 @@ static int login(AFPObj *obj, struct passwd *pwd, void (*logout)(void))
                 sprintf(nodename, "%s/net%d.%dnode%d", obj->options.authprintdir,
                         addr_net / 256, addr_net % 256, addr_node);
                 LOG(log_info, logtype_default, "registering %s (uid %d) on %u.%u as %s",
-                        pwd->pw_name, pwd->pw_uid, addr_net, addr_node, nodename);
+                    pwd->pw_name, pwd->pw_uid, addr_net, addr_node, nodename);
 
                 if (stat(nodename, &stat_buf) == 0) { /* file exists */
                     if (S_ISREG(stat_buf.st_mode)) { /* normal file */
@@ -259,7 +259,7 @@ static int login(AFPObj *obj, struct passwd *pwd, void (*logout)(void))
             return AFPERR_BADUAM;
 
         LOG(log_info, logtype_default, "session from %s (%s)", hostname,
-                inet_ntoa( dsi->client.sin_addr ) );
+            inet_ntoa( dsi->client.sin_addr ) );
 
         if (setegid( pwd->pw_gid ) < 0 || seteuid( pwd->pw_uid ) < 0) {
             LOG(log_error, logtype_default, "login: %m" );
@@ -409,8 +409,8 @@ int         ibuflen, *rbuflen;
     len = uam->u.uam_changepw(obj, username, pwd, ibuf, ibuflen,
                               rbuf, rbuflen);
     LOG(log_info, logtype_default, "password change %s.",
-           (len == AFPERR_AUTHCONT) ? "continued" :
-           (len ? "failed" : "succeeded"));
+        (len == AFPERR_AUTHCONT) ? "continued" :
+        (len ? "failed" : "succeeded"));
     return len;
 }
 
index 772096fa7dd867df8f5e1812ebdea8f3bc22ebdf..3ad6d1d46c31b460ad994903ef5e441f4fbd0567 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: directory.c,v 1.25 2002-01-04 04:45:47 sibaz Exp $
+ * $Id: directory.c,v 1.26 2002-01-19 21:29:55 jmarcus Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -456,11 +456,11 @@ static int deletedir(char *dir)
                     continue; /* somebody went and deleted it behind our backs. */
                 case EROFS:
                     err = AFPERR_VLOCK;
-                                       break;
+                    break;
                 case EPERM:
                 case EACCES :
                     err = AFPERR_ACCESS;
-                                       break;
+                    break;
                 default :
                     err = AFPERR_PARAM;
                 }
@@ -1229,7 +1229,7 @@ int setdirparams(const struct vol *vol,
                     break;
                 default :
                     LOG(log_error, logtype_default, "setdirparam: setdeskowner: %s",
-                            strerror(errno) );
+                        strerror(errno) );
                     if (!isad) {
                         err = AFPERR_PARAM;
                         goto setdirparam_done;
@@ -1250,7 +1250,7 @@ int setdirparams(const struct vol *vol,
                     break;
                 default :
                     LOG(log_error, logtype_default, "setdirparam: setdirowner: %s",
-                            strerror(errno) );
+                        strerror(errno) );
                     break;
                 }
             }
@@ -1295,7 +1295,7 @@ int setdirparams(const struct vol *vol,
                     break;
                 default :
                     LOG(log_error, logtype_default, "setdirparam: setdirowner: %s",
-                            strerror(errno) );
+                        strerror(errno) );
                     break;
                 }
             }
@@ -1320,7 +1320,7 @@ int setdirparams(const struct vol *vol,
                 goto setdirparam_done;
             default :
                 LOG(log_error, logtype_default, "setdirparam: setdeskmode: %s",
-                        strerror(errno) );
+                    strerror(errno) );
                 break;
                 err = AFPERR_PARAM;
                 goto setdirparam_done;
@@ -1340,7 +1340,7 @@ int setdirparams(const struct vol *vol,
                 goto setdirparam_done;
             default :
                 LOG(log_error, logtype_default, "setdirparam: setdirmode: %s",
-                        strerror(errno) );
+                    strerror(errno) );
                 err = AFPERR_PARAM;
                 goto setdirparam_done;
             }
index 9f828e712b2fb3d9082a70a669f41bb897853de3..3b7d246847f9f3636cabfdc2b66187dffd6b449a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: filedir.c,v 1.20 2002-01-04 04:45:47 sibaz Exp $
+ * $Id: filedir.c,v 1.21 2002-01-19 21:29:55 jmarcus Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -84,8 +84,8 @@ more information */
     }
     else if (stat(".", &sb) < 0) {
         LOG(log_error, logtype_default,
-                "matchfile2dirperms: Error checking directory \"%s\": %s",
-                dir->d_name, strerror(errno));
+            "matchfile2dirperms: Error checking directory \"%s\": %s",
+            dir->d_name, strerror(errno));
         return(AFPERR_NOOBJ );
     }
     else {
@@ -96,48 +96,48 @@ more information */
             if (lchown(upath, sb.st_uid, sb.st_gid) < 0)
             {
                 LOG(log_error, logtype_default,
-                        "matchfile2dirperms: Error changing owner/gid of %s: %s",
-                        upath, strerror(errno));
+                    "matchfile2dirperms: Error changing owner/gid of %s: %s",
+                    upath, strerror(errno));
                 return (AFPERR_ACCESS);
             }
             if (chmod(upath,(st.st_mode&0777&~default_options.umask)| S_IRGRP| S_IROTH) < 0)
             {
                 LOG(log_error, logtype_default,
-                        "matchfile2dirperms:  Error adding file read permissions: %s",
-                        strerror(errno));
+                    "matchfile2dirperms:  Error adding file read permissions: %s",
+                    strerror(errno));
                 return (AFPERR_ACCESS);
             }
 #ifdef DEBUG
             else
                 LOG(log_info, logtype_default,
-                        "matchfile2dirperms:  Added S_IRGRP and S_IROTH: %s",
-                        strerror(errno));
+                    "matchfile2dirperms:  Added S_IRGRP and S_IROTH: %s",
+                    strerror(errno));
 #endif /* DEBUG */
             if (lchown(adpath, sb.st_uid, sb.st_gid) < 0)
             {
                 LOG(log_error, logtype_default,
-                        "matchfile2dirperms: Error changing AppleDouble owner/gid %s: %s",
-                        adpath, strerror(errno));
+                    "matchfile2dirperms: Error changing AppleDouble owner/gid %s: %s",
+                    adpath, strerror(errno));
                 return (AFPERR_ACCESS);
             }
             if (chmod(adpath, (st.st_mode&0777&~default_options.umask)| S_IRGRP| S_IROTH) < 0)
             {
                 LOG(log_error, logtype_default,
-                        "matchfile2dirperms:  Error adding AD file read permissions: %s",
-                        strerror(errno));
+                    "matchfile2dirperms:  Error adding AD file read permissions: %s",
+                    strerror(errno));
                 return (AFPERR_ACCESS);
             }
 #ifdef DEBUG
             else
                 LOG(log_info, logtype_default,
-                        "matchfile2dirperms:  Added S_IRGRP and S_IROTH to AD: %s",
-                        strerror(errno));
+                    "matchfile2dirperms:  Added S_IRGRP and S_IROTH to AD: %s",
+                    strerror(errno));
 #endif /* DEBUG */
         }
 #ifdef DEBUG
         else
             LOG(log_info, logtype_default,
-                    "matchfile2dirperms: No ownership change necessary.");
+                "matchfile2dirperms: No ownership change necessary.");
 #endif /* DEBUG */
     } /* end else if stat success */
     seteuid(uid); /* Restore process ownership to normal */
index 0e93e4ab243a93cd4b29c32d0e7693db9e14aa5c..48563cc47a11100ce731b7e537a742c9d0ebb6e7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nfsquota.c,v 1.6 2002-01-04 04:45:47 sibaz Exp $
+ * $Id: nfsquota.c,v 1.7 2002-01-19 21:29:55 jmarcus Exp $
  *
  * parts of this are lifted from the bsd quota program and are
  * therefore under the following copyright:
@@ -132,7 +132,7 @@ int getnfsquota(const struct vol *vol, const int uid, const u_int32_t bsize,
                  (xdrproc_t) xdr_getquota_args, (char *) &gq_args,
                  (xdrproc_t) xdr_getquota_rslt, (char *) &gq_rslt) != 0) {
         LOG(log_info, logtype_default, "nfsquota: can't retrieve nfs quota information. \
-               make sure that rpc.rquotad is running on %s.", vol->v_gvs);
+            make sure that rpc.rquotad is running on %s.", vol->v_gvs);
         *hostpath = ':';
         return AFPERR_PARAM;
     }
@@ -143,7 +143,7 @@ int getnfsquota(const struct vol *vol, const int uid, const u_int32_t bsize,
 
     case Q_EPERM:
         LOG(log_error, logtype_default, "nfsquota: quota permission error, host: %s\n",
-               vol->v_gvs);
+            vol->v_gvs);
         break;
 
     case Q_OK: /* we only copy the bits that we need. */
index bd6d778aea089964386562f3453a3609a3462bd1..9470a3be02c305484588aafd00b37d099a7d0f7e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ofork.c,v 1.9 2002-01-17 16:13:34 jmarcus Exp $
+ * $Id: ofork.c,v 1.10 2002-01-19 21:29:55 jmarcus Exp $
  *
  * Copyright (c) 1996 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -155,12 +155,12 @@ struct adouble      *ad;
     for ( refnum = ++lastrefnum, i = 0; i < nforks; i++, refnum++ ) {
         /* cf AFP3.0.pdf, File fork page 40 */
         if (!refnum)
-           refnum++;
+            refnum++;
         if ( oforks[ refnum % nforks ] == NULL ) {
             break;
         }
     }
-    /* grr, Apple and their 'uniquely identifies' 
+    /* grr, Apple and their 'uniquely identifies'
           the next line is a protection against 
           of_alloc()
              refnum % nforks = 3 
index 9d46adb77f045d50dfdd7ac0ad0e4a56ee4b58f2..a9bd470b5294c293056e7a03d5052c7fb436d464 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: switch.c,v 1.5 2002-01-04 04:45:47 sibaz Exp $
+ * $Id: switch.c,v 1.6 2002-01-19 21:29:55 jmarcus Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
@@ -220,7 +220,7 @@ int uam_afpserver_action(const int id, const int which,
         break;
     default:
         LOG(log_debug, logtype_default, "uam_afpserver_action: unknown switch %d[%d]",
-               which, id);
+            which, id);
         return -1;
     }
 
index a7c75f1b92e28a58f5ac87443b359fb1156a1679..d96b2f5ea1f6ba818aa364426dfb2c150d576b84 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uam.c,v 1.18 2002-01-04 04:45:47 sibaz Exp $
+ * $Id: uam.c,v 1.19 2002-01-19 21:29:55 jmarcus Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * All Rights Reserved.  See COPYRIGHT.
@@ -85,14 +85,14 @@ struct uam_mod *uam_load(const char *path, const char *name)
         *p = '\0';
     if ((mod->uam_fcn = mod_symbol(module, buf)) == NULL) {
         LOG(log_error, logtype_default, "uam_load(%s): mod_symbol error for symbol %s",
-               name,
-               buf);
+            name,
+            buf);
         goto uam_load_err;
     }
 
     if (mod->uam_fcn->uam_type != UAM_MODULE_SERVER) {
         LOG(log_error, logtype_default, "uam_load(%s): attempted to load a non-server module",
-               name);
+            name);
         goto uam_load_err;
     }
 
@@ -141,7 +141,7 @@ int uam_register(const int type, const char *path, const char *name, ...)
         if (strcmp(uam->uam_path, path)) {
             /* it exists, but it's not the same module. */
             LOG(log_error, logtype_default, "uam_register: \"%s\" already loaded by %s",
-                   name, path);
+                name, path);
             return -1;
         }
         uam->uam_count++;
index 70ae68c554a6958f3da3903149f57d8b9d33dc0f..5173c32b2117833b51a6b7284a0f995ec34b23c8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uid.c,v 1.8 2002-01-04 04:45:47 sibaz Exp $
+ * $Id: uid.c,v 1.9 2002-01-19 21:29:55 jmarcus Exp $
  * code: jeff@univrel.pr.uconn.edu
  *
  * These functions are abstracted here, so that all calls for resolving
@@ -43,10 +43,10 @@ uidgidset **pair;
 {
     if ( seteuid ( (*pair)->uid ) < 0 )
         LOG(log_error, logtype_default, "restore_uidgid: unable to seteuid '%s': %m",
-                 (*pair)->uid );
+            (*pair)->uid );
     if ( setegid ( (*pair)->gid ) < 0 )
         LOG(log_error, logtype_default, "restore_uidgid: unable to setegid '%s': %m",
-                 (*pair)->gid );
+            (*pair)->gid );
 } /* end function void restore_uidgid ( pair ) */
 
 void set_uidgid ( this_volume )
@@ -58,14 +58,14 @@ const struct vol    *this_volume;
     if ( uid = user_to_uid ( (this_volume)->v_forceuid ) ) {
         if ( seteuid ( uid ) < 0 )
             LOG(log_error, logtype_default, "set_uidgid: unable to seteuid '%s': %m",
-                     (this_volume)->v_forceuid );
+                (this_volume)->v_forceuid );
     } /* end of checking for (this_volume)->v_forceuid */
 
     /* check to see if we have to switch groups */
     if ( gid = group_to_gid ( (this_volume)->v_forcegid ) ) {
         if ( seteuid ( gid ) < 0 )
             LOG(log_error, logtype_default, "set_uidgid: unable to setegid '%s': %m",
-                     (this_volume)->v_forcegid );
+                (this_volume)->v_forcegid );
     } /* end of checking for (this_volume)->v_forcegid */
 
 } /* end function void set_uidgid ( username, group ) */
index d612b63f71cbf140240d78afca3b1684ef0d71c5..9f1b5a744432ef264170318a9c4fac1d48727292 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: unix.c,v 1.28 2002-01-04 04:45:47 sibaz Exp $
+ * $Id: unix.c,v 1.29 2002-01-19 21:29:55 jmarcus Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -253,7 +253,7 @@ const int dropbox;
             */
             if ( (chmod( name, (DIRBITS | mode) & 0777 & ~default_options.umask ) < 0) && errno != EPERM)  {
                 LOG(log_error, logtype_default, "stickydirmode: chmod \"%s\": %s",
-                        name, strerror(errno) );
+                    name, strerror(errno) );
                 retval = -1;
             }
 #ifdef DROPKLUDGE
@@ -305,18 +305,18 @@ const mode_t      mode;
             /* XXX: need to preserve special modes */
             if (stat(modbuf, &st) < 0) {
                 LOG(log_error, logtype_default, "setdeskmode: stat %s: %s",
-                        modbuf, strerror(errno) );
+                    modbuf, strerror(errno) );
                 continue;
             }
 
             if (S_ISDIR(st.st_mode)) {
                 if ( chmod( modbuf,  (DIRBITS | mode) & 0777 & ~default_options.umask ) < 0 && errno != EPERM ) {
                     LOG(log_error, logtype_default, "setdeskmode: chmod %s: %s",
-                            modbuf, strerror(errno) );
+                        modbuf, strerror(errno) );
                 }
             } else if ( chmod( modbuf,  mode & 0777 & ~default_options.umask ) < 0 && errno != EPERM ) {
                 LOG(log_error, logtype_default, "setdeskmode: chmod %s: %s",
-                        modbuf, strerror(errno) );
+                    modbuf, strerror(errno) );
             }
 
         }
@@ -324,7 +324,7 @@ const mode_t        mode;
         /* XXX: need to preserve special modes */
         if ( chmod( deskp->d_name,  (DIRBITS | mode) & 0777 & ~default_options.umask ) < 0 && errno != EPERM ) {
             LOG(log_error, logtype_default, "setdeskmode: chmod %s: %s",
-                    deskp->d_name, strerror(errno) );
+                deskp->d_name, strerror(errno) );
         }
     }
     closedir( desk );
@@ -361,7 +361,7 @@ const int dropbox;
         }
         if ( stat( dirp->d_name, &st ) < 0 ) {
             LOG(log_error, logtype_default, "setdirmode: stat %s: %s",
-                    dirp->d_name, strerror(errno) );
+                dirp->d_name, strerror(errno) );
             continue;
         }
 
@@ -460,14 +460,14 @@ const gid_t       gid;
             /* XXX: add special any uid, ignore group bits */
             if ( chown( modbuf, uid, gid ) < 0 && errno != EPERM ) {
                 LOG(log_error, logtype_default, "setdeskown: chown %s: %s",
-                        modbuf, strerror(errno) );
+                    modbuf, strerror(errno) );
             }
         }
         closedir( sub );
         /* XXX: add special any uid, ignore group bits */
         if ( chown( deskp->d_name, uid, gid ) < 0 && errno != EPERM ) {
             LOG(log_error, logtype_default, "setdeskowner: chown %s: %s",
-                    deskp->d_name, strerror(errno) );
+                deskp->d_name, strerror(errno) );
         }
     }
     closedir( desk );
@@ -477,7 +477,7 @@ const gid_t gid;
     }
     if ( chown( ".AppleDesktop", uid, gid ) < 0 && errno != EPERM ) {
         LOG(log_error, logtype_default, "setdeskowner: chown .AppleDesktop: %s",
-                strerror(errno) );
+            strerror(errno) );
     }
     return( 0 );
 }
@@ -507,13 +507,13 @@ const int   noadouble;
         };
         if ( stat( dirp->d_name, &st ) < 0 ) {
             LOG(log_error, logtype_default, "setdirowner: stat %s: %s",
-                    dirp->d_name, strerror(errno) );
+                dirp->d_name, strerror(errno) );
             continue;
         }
         if (( st.st_mode & S_IFMT ) == S_IFREG ) {
             if ( chown( dirp->d_name, uid, gid ) < 0 && errno != EPERM ) {
                 LOG(log_debug, logtype_default, "setdirowner: chown %s: %s",
-                        dirp->d_name, strerror(errno) );
+                    dirp->d_name, strerror(errno) );
                 /* return ( -1 ); Sometimes this is okay */
             }
         }
@@ -536,7 +536,7 @@ const int   noadouble;
         strcat( buf, dirp->d_name );
         if ( chown( buf, uid, gid ) < 0 && errno != EPERM ) {
             LOG(log_debug, logtype_default, "setdirowner: chown %d/%d %s: %s",
-                    uid, gid, buf, strerror(errno) );
+                uid, gid, buf, strerror(errno) );
             /* return ( -1 ); Sometimes this is okay */
         }
     }
@@ -552,7 +552,7 @@ const int   noadouble;
     if ( gid && gid != st.st_gid && chown( ".AppleDouble", uid, gid ) < 0 &&
             errno != EPERM ) {
         LOG(log_debug, logtype_default, "setdirowner: chown %d/%d .AppleDouble: %s",
-                uid, gid, strerror(errno) );
+            uid, gid, strerror(errno) );
         /* return ( -1 ); Sometimes this is okay */
     }
 
@@ -563,7 +563,7 @@ setdirowner_noadouble:
     if ( gid && gid != st.st_gid && chown( ".", uid, gid ) < 0 &&
             errno != EPERM ) {
         LOG(log_debug, logtype_default, "setdirowner: chown %d/%d .: %s",
-                uid, gid, strerror(errno) );
+            uid, gid, strerror(errno) );
     }
 
     return( 0 );
index c5ea725134db04664359811573307427622681d5..82d52ffc0250f809ad5d8c2927e77fd2fb639ba3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.c,v 1.20 2002-01-18 05:23:25 jmarcus Exp $
+ * $Id: volume.c,v 1.21 2002-01-19 21:29:55 jmarcus Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -1059,7 +1059,7 @@ int       ibuflen, *rbuflen;
     for ( vcnt = 0, volume = volumes; volume; volume = volume->v_next ) {
         if ( stat( volume->v_path, &st ) < 0 ) {
             LOG(log_info, logtype_default, "afp_getsrvrparms: stat %s: %s",
-                    volume->v_path, strerror(errno) );
+                volume->v_path, strerror(errno) );
             continue;          /* can't access directory */
         }
         if (!S_ISDIR(st.st_mode)) {
@@ -1399,23 +1399,23 @@ int             ibuflen, *rbuflen;
 
 int wincheck(struct vol *vol, const char *path)
 {
-        int len;
+    int len;
 
-        if (!(vol->v_flags & AFPVOL_MSWINDOWS))
-                return 1;
+    if (!(vol->v_flags & AFPVOL_MSWINDOWS))
+        return 1;
 
-        /* empty paths are not allowed */
-        if ((len = strlen(path)) == 0)
-                return 0;
+    /* empty paths are not allowed */
+    if ((len = strlen(path)) == 0)
+        return 0;
 
-        /* leading or trailing whitespaces are not allowed */
-        if ((*path == ' ') || (path[len-1] == ' '))
-                return 0;
+    /* leading or trailing whitespaces are not allowed */
+    if ((*path == ' ') || (path[len-1] == ' '))
+        return 0;
 
-        /* certain characters are not allowed */
-        if (strpbrk(path, MSWINDOWS_BADCHARS))
-                return 0;
+    /* certain characters are not allowed */
+    if (strpbrk(path, MSWINDOWS_BADCHARS))
+        return 0;
 
-        /* everything else is okay */
-        return 1;
+    /* everything else is okay */
+    return 1;
 }