/*
- * $Id: afp_dsi.c,v 1.14 2001-12-23 01:19:55 jmarcus Exp $
+ * $Id: afp_dsi.c,v 1.15 2002-01-03 17:29:10 sibaz Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
afp_dsi_close(child.obj);
if (sig) /* if no signal, assume dieing because logins are disabled &
don't log it (maintenance mode)*/
- syslog (LOG_INFO, "Connection terminated");
+ syslog(LOG_INFO, "Connection terminated");
if (sig == SIGTERM || sig == SIGALRM) {
exit( 0 );
}
/*
- * $Id: auth.c,v 1.20 2001-12-03 05:03:38 jmarcus Exp $
+ * $Id: auth.c,v 1.21 2002-01-03 17:29:10 sibaz Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
sprintf(nodename, "%s/net%d.%dnode%d", obj->options.authprintdir,
addr_net / 256, addr_net % 256, addr_node);
- syslog (LOG_INFO, "registering %s (uid %d) on %u.%u as %s",
+ syslog(LOG_INFO, "registering %s (uid %d) on %u.%u as %s",
pwd->pw_name, pwd->pw_uid, addr_net, addr_node, nodename);
if (stat(nodename, &stat_buf) == 0) { /* file exists */
/*
- * $Id: file.c,v 1.32 2002-01-02 21:14:10 srittau Exp $
+ * $Id: file.c,v 1.33 2002-01-03 17:29:10 sibaz Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
/* existence check moved to afp_moveandrename */
#ifdef DEBUG
- syslog (LOG_INFO, "begin renamefile:");
+ syslog(LOG_INFO, "begin renamefile:");
#endif /* DEBUG */
if ( rename( src, dst ) < 0 ) {
ad_close( &ad, ADFLAGS_HF );
#ifdef DEBUG
- syslog (LOG_INFO, "end renamefile:");
+ syslog(LOG_INFO, "end renamefile:");
#endif /* DEBUG */
return( AFP_OK );
u_int16_t svid, dvid;
#ifdef DEBUG
- syslog (LOG_INFO, "begin afp_copyfile:");
+ syslog(LOG_INFO, "begin afp_copyfile:");
#endif /* DEBUG */
*rbuflen = 0;
#endif /* DROPKLUDGE */
#ifdef DEBUG
- syslog (LOG_INFO, "end afp_copyfile:");
+ syslog(LOG_INFO, "end afp_copyfile:");
#endif /* DEBUG */
return( retvalue );
/*
- * $Id: filedir.c,v 1.17 2002-01-02 21:14:10 srittau Exp $
+ * $Id: filedir.c,v 1.18 2002-01-03 17:29:10 sibaz Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
int uid;
#ifdef DEBUG
- syslog (LOG_INFO, "begin matchfile2dirperms:");
+ syslog(LOG_INFO, "begin matchfile2dirperms:");
#endif /* DEBUG */
if (stat(upath, &st ) < 0)
strcpy (adpath, "./.AppleDouble/");
strcat (adpath, upath);
if (( dir = dirsearch( vol, did )) == NULL ) {
- syslog (LOG_ERR, "matchfile2dirperms: Unable to get directory info.");
+ syslog(LOG_ERR, "matchfile2dirperms: Unable to get directory info.");
return( AFPERR_NOOBJ );
}
else if (stat(".", &sb) < 0) {
- syslog (LOG_ERR,
+ syslog(LOG_ERR,
"matchfile2dirperms: Error checking directory \"%s\": %s",
dir->d_name, strerror(errno));
return(AFPERR_NOOBJ );
seteuid(0);
if (lchown(upath, sb.st_uid, sb.st_gid) < 0)
{
- syslog (LOG_ERR,
+ syslog(LOG_ERR,
"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)
{
- syslog (LOG_ERR,
+ syslog(LOG_ERR,
"matchfile2dirperms: Error adding file read permissions: %s",
strerror(errno));
return (AFPERR_ACCESS);
}
#ifdef DEBUG
else
- syslog (LOG_INFO,
+ syslog(LOG_INFO,
"matchfile2dirperms: Added S_IRGRP and S_IROTH: %s",
strerror(errno));
#endif /* DEBUG */
if (lchown(adpath, sb.st_uid, sb.st_gid) < 0)
{
- syslog (LOG_ERR,
+ syslog(LOG_ERR,
"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)
{
- syslog (LOG_ERR,
+ syslog(LOG_ERR,
"matchfile2dirperms: Error adding AD file read permissions: %s",
strerror(errno));
return (AFPERR_ACCESS);
}
#ifdef DEBUG
else
- syslog (LOG_INFO,
+ syslog(LOG_INFO,
"matchfile2dirperms: Added S_IRGRP and S_IROTH to AD: %s",
strerror(errno));
#endif /* DEBUG */
}
#ifdef DEBUG
else
- syslog (LOG_INFO,
+ syslog(LOG_INFO,
"matchfile2dirperms: No ownership change necessary.");
#endif /* DEBUG */
} /* end else if stat success */
seteuid(uid); /* Restore process ownership to normal */
#ifdef DEBUG
- syslog (LOG_INFO, "end matchfile2dirperms:");
+ syslog(LOG_INFO, "end matchfile2dirperms:");
#endif /* DEBUG */
return (AFP_OK);
/*
- * $Id: messages.c,v 1.11 2001-12-10 20:16:54 srittau Exp $
+ * $Id: messages.c,v 1.12 2002-01-03 17:29:10 sibaz Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
sprintf(filename, "%s/message.%d", SERVERTEXT, getpid());
#ifdef DEBUG
- syslog (LOG_DEBUG, "Reading file %s ", filename);
+ syslog(LOG_DEBUG, "Reading file %s ", filename);
#endif /* DEBUG */
message=fopen(filename, "r");
if (message==NULL) {
- syslog (LOG_INFO, "Unable to open file %s", filename);
+ syslog(LOG_INFO, "Unable to open file %s", filename);
sprintf(filename, "%s/message", SERVERTEXT);
message=fopen(filename, "r");
}
}
if (rc < 0) {
- syslog (LOG_ERR, "Error deleting %s: %m", filename);
+ syslog(LOG_ERR, "Error deleting %s: %m", filename);
}
#ifdef DEBUG
else {
- syslog (LOG_INFO, "Deleted %s", filename);
+ syslog(LOG_INFO, "Deleted %s", filename);
}
- syslog (LOG_INFO, "Set server message to \"%s\"", servermesg);
+ syslog(LOG_INFO, "Set server message to \"%s\"", servermesg);
#endif /* DEBUG */
}
free(filename);
/*
- * $Id: uid.c,v 1.6 2001-12-03 05:03:38 jmarcus Exp $
+ * $Id: uid.c,v 1.7 2002-01-03 17:29:10 sibaz Exp $
* code: jeff@univrel.pr.uconn.edu
*
* These functions are abstracted here, so that all calls for resolving
uidgidset **pair;
{
if ( seteuid ( (*pair)->uid ) < 0 )
- syslog ( LOG_ERR, "restore_uidgid: unable to seteuid '%s': %m",
+ syslog( LOG_ERR, "restore_uidgid: unable to seteuid '%s': %m",
(*pair)->uid );
if ( setegid ( (*pair)->gid ) < 0 )
- syslog ( LOG_ERR, "restore_uidgid: unable to setegid '%s': %m",
+ syslog( LOG_ERR, "restore_uidgid: unable to setegid '%s': %m",
(*pair)->gid );
} /* end function void restore_uidgid ( pair ) */
/* check to see if we have to switch users */
if ( uid = user_to_uid ( (this_volume)->v_forceuid ) ) {
if ( seteuid ( uid ) < 0 )
- syslog ( LOG_ERR, "set_uidgid: unable to seteuid '%s': %m",
+ syslog( LOG_ERR, "set_uidgid: unable to seteuid '%s': %m",
(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 )
- syslog ( LOG_ERR, "set_uidgid: unable to setegid '%s': %m",
+ syslog( LOG_ERR, "set_uidgid: unable to setegid '%s': %m",
(this_volume)->v_forcegid );
} /* end of checking for (this_volume)->v_forcegid */
/*
- * $Id: ad_open.c,v 1.10 2001-08-15 02:17:06 srittau Exp $
+ * $Id: ad_open.c,v 1.11 2002-01-03 17:29:12 sibaz Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
* Copyright (c) 1990,1991 Regents of The University of Michigan.
int mode;
{
#ifdef DEBUG
- syslog (LOG_INFO, "ad_mkdir: Creating directory with mode %d", mode);
+ syslog(LOG_INFO, "ad_mkdir: Creating directory with mode %d", mode);
#endif /* DEBUG */
return mkdir( path, ad_mode( path, mode ) );
}