/*
- * $Id: afp_asp.c,v 1.6.2.3 2002-02-08 02:44:05 jmarcus Exp $
+ * $Id: afp_asp.c,v 1.6.2.4 2002-03-05 02:08:12 jmarcus Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
#ifdef AFS
if ( writtenfork ) {
if ( flushfork( writtenfork ) < 0 ) {
- syslog( LOG_ERR, "main flushfork: %m" );
+ syslog( LOG_ERR, "main flushfork: %s", strerror(errno) );
}
writtenfork = NULL;
}
/*
- * $Id: auth.c,v 1.19.2.2 2002-02-07 23:55:35 srittau Exp $
+ * $Id: auth.c,v 1.19.2.3 2002-03-05 02:08:12 jmarcus Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
inet_ntoa( dsi->client.sin_addr ) );
if (setegid( pwd->pw_gid ) < 0 || seteuid( pwd->pw_uid ) < 0) {
- syslog( LOG_ERR, "login: %m" );
+ syslog( LOG_ERR, "login: %s", strerror(errno) );
return AFPERR_BADUAM;
}
}
/*
- * $Id: file.c,v 1.29.2.5 2002-02-09 20:29:02 jmarcus Exp $
+ * $Id: file.c,v 1.29.2.6 2002-03-05 02:08:12 jmarcus Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
return AFPERR_ACCESS;
break;
default:
- syslog(LOG_ERR, "afp_createid: cnid_add: %m");
+ syslog(LOG_ERR, "afp_createid: cnid_add: %s", strerror(errno));
return AFPERR_PARAM;
}
}
/*
- * $Id: messages.c,v 1.9.2.2 2002-01-02 17:27:50 srittau Exp $
+ * $Id: messages.c,v 1.9.2.3 2002-03-05 02:08:12 jmarcus Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
/* Delete will probably fail otherwise, but let's try anyways */
euid = geteuid();
if (seteuid(0) < 0) {
- syslog(LOG_ERR, "Could not switch back to root: %m");
+ syslog(LOG_ERR, "Could not switch back to root: %s", strerror(errno));
}
rc = unlink(filename);
/* Drop privs again, failing this is very bad */
if (seteuid(euid) < 0) {
- syslog(LOG_ERR, "Could not switch back to uid %d: %m", euid);
+ syslog(LOG_ERR, "Could not switch back to uid %d: %s", euid, strerror(errno));
}
if (rc < 0) {
- syslog (LOG_ERR, "Error deleting %s: %m", filename);
+ syslog (LOG_ERR, "Error deleting %s: %s", filename, strerror(rc));
}
#ifdef DEBUG
else {
/*
- * $Id: quota.c,v 1.11.2.4 2002-02-08 02:57:26 jmarcus Exp $
+ * $Id: quota.c,v 1.11.2.5 2002-03-05 02:08:12 jmarcus Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
static struct fs_data fsd;
if ( getmnt(0, &fsd, 0, STAT_ONE, file ) < 0 ) {
- syslog(LOG_INFO, "special: getmnt %s: %m", file );
+ syslog(LOG_INFO, "special: getmnt %s: %s", file, strerror(errno) );
return( NULL );
}
if (vol->v_nfs) {
if (( vol->v_gvs = (char *)malloc( strlen( p ) + 1 )) == NULL ) {
- syslog( LOG_ERR, "getquota: malloc: %m" );
+ syslog( LOG_ERR, "getquota: malloc: %s", strerror(errno));
return AFPERR_MISC;
}
strcpy( vol->v_gvs, p );
} else {
sprintf( buf, "%s/quotas", p );
if (( vol->v_qfd = open( buf, O_RDONLY, 0 )) < 0 ) {
- syslog( LOG_INFO, "open %s: %m", buf );
+ syslog( LOG_INFO, "open %s: %s", buf, strerror(errno) );
return( AFPERR_PARAM );
}
}
/*
- * $Id: uid.c,v 1.5.2.1 2001-12-03 05:01:04 jmarcus Exp $
+ * $Id: uid.c,v 1.5.2.2 2002-03-05 02:08:12 jmarcus 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",
- (*pair)->uid );
+ syslog ( LOG_ERR, "restore_uidgid: unable to seteuid '%s': %s",
+ (*pair)->uid, strerror(errno) );
if ( setegid ( (*pair)->gid ) < 0 )
- syslog ( LOG_ERR, "restore_uidgid: unable to setegid '%s': %m",
- (*pair)->gid );
+ syslog ( LOG_ERR, "restore_uidgid: unable to setegid '%s': %s",
+ (*pair)->gid, strerror(errno) );
} /* end function void restore_uidgid ( pair ) */
void set_uidgid ( this_volume )
/* 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",
- (this_volume)->v_forceuid );
+ syslog ( LOG_ERR, "set_uidgid: unable to seteuid '%s': %s",
+ (this_volume)->v_forceuid, strerror(errno) );
} /* 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",
- (this_volume)->v_forcegid );
+ syslog ( LOG_ERR, "set_uidgid: unable to setegid '%s': %s",
+ (this_volume)->v_forcegid, strerror(errno) );
} /* end of checking for (this_volume)->v_forcegid */
} /* end function void set_uidgid ( username, group ) */
/*
- * $Id: unix.c,v 1.24.2.2 2001-12-15 06:32:14 jmarcus Exp $
+ * $Id: unix.c,v 1.24.2.3 2002-03-05 02:08:12 jmarcus Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
else { /* if S_IWOTH and not S_IROTH */
uid=geteuid();
if ( seteuid(0) < 0) {
- syslog( LOG_ERR, "stickydirmode: unable to seteuid root: %m");
+ syslog( LOG_ERR, "stickydirmode: unable to seteuid root: %s", strerror(errno));
}
if ( retval=chmod( name, ( (DIRBITS | mode | S_ISVTX) & 0777 & ~default_options.umask) ) < 0) {
- syslog( LOG_ERR, "stickydirmode: chmod \"%s\": %m", name );
+ syslog( LOG_ERR, "stickydirmode: chmod \"%s\": %s", name, strerror(retval) );
return(AFPERR_ACCESS);
} else {
#ifdef DEBUG
- syslog( LOG_INFO, "stickydirmode: (debug) chmod \"%s\": %m", name );
+ syslog( LOG_INFO, "stickydirmode: (debug) chmod \"%s\"", name );
#endif /* DEBUG */
seteuid(uid);
} /* end getting retval */