mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
1) print only errors if -v not given, it allows non-verbose
crontab runnig 2) use full path /usr/bin/mail for security reasons 3) Use time_t instead of long for time (in one place)
This commit is contained in:
parent
e30f001135
commit
a4ac83ea2c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19270
@ -32,6 +32,9 @@
|
||||
* across the network to save BandWidth
|
||||
*
|
||||
* $Log: supcmeat.c,v $
|
||||
* Revision 1.2 1995/12/26 05:03:05 peter
|
||||
* Apply ports/net/sup/patches/patch-aa...
|
||||
*
|
||||
* Revision 1.1.1.1 1995/12/26 04:54:46 peter
|
||||
* Import the unmodified version of the sup that we are using.
|
||||
* The heritage of this version is not clear. It appears to be NetBSD
|
||||
@ -322,7 +325,7 @@ int *tout;
|
||||
/* If protocol is > 7 then try compression */
|
||||
if (protver > 7) {
|
||||
cancompress = TRUE;
|
||||
notify ("SUP Fileserver supports compression.\n");
|
||||
vnotify ("SUP Fileserver supports compression.\n");
|
||||
}
|
||||
return (FALSE);
|
||||
}
|
||||
@ -632,7 +635,7 @@ register TREE *t;
|
||||
denyone (t)
|
||||
register TREE *t;
|
||||
{
|
||||
vnotify ("SUP: Access denied to %s\n",t->Tname);
|
||||
notify ("SUP: Access denied to %s\n",t->Tname);
|
||||
return (SCMOK);
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,11 @@
|
||||
**********************************************************************
|
||||
* HISTORY
|
||||
* $Log: supcmisc.c,v $
|
||||
* Revision 1.1.1.1 1995/12/26 04:54:46 peter
|
||||
* Import the unmodified version of the sup that we are using.
|
||||
* The heritage of this version is not clear. It appears to be NetBSD
|
||||
* derived from some time ago.
|
||||
*
|
||||
* Revision 1.2 1994/06/20 06:04:11 rgrimes
|
||||
* Humm.. they did a lot of #if __STDC__ but failed to properly prototype
|
||||
* the code. Also fixed one bad argument to a wait3 call.
|
||||
@ -272,7 +277,7 @@ va_dcl
|
||||
#endif
|
||||
char buf[STRINGLENGTH];
|
||||
char collrelname[STRINGLENGTH];
|
||||
long tloc;
|
||||
time_t tloc;
|
||||
static FILE *noteF = NULL; /* mail program on pipe */
|
||||
va_list ap;
|
||||
|
||||
@ -295,7 +300,7 @@ va_dcl
|
||||
|
||||
if (noteF == NULL) {
|
||||
if ((thisC->Cflags&CFMAIL) && thisC->Cnotify) {
|
||||
(void) sprintf (buf,"mail -s \"SUP Upgrade of %s\" %s >/dev/null",
|
||||
(void) sprintf (buf,"/usr/bin/mail -s \"SUP Upgrade of %s\" %s >/dev/null",
|
||||
collrelname,thisC->Cnotify);
|
||||
noteF = popen (buf,"w");
|
||||
if (noteF == NULL) {
|
||||
@ -305,10 +310,12 @@ va_dcl
|
||||
}
|
||||
} else
|
||||
noteF = stdout;
|
||||
tloc = time ((long *)NULL);
|
||||
fprintf (noteF,"SUP Upgrade of %s at %s",
|
||||
collrelname,ctime (&tloc));
|
||||
(void) fflush (noteF);
|
||||
if (thisC->Cflags&CFVERBOSE) {
|
||||
tloc = time ((time_t *)NULL);
|
||||
fprintf (noteF,"SUP Upgrade of %s at %s",
|
||||
collrelname,ctime (&tloc));
|
||||
(void) fflush (noteF);
|
||||
}
|
||||
}
|
||||
vfprintf(noteF,fmt,ap);
|
||||
va_end(ap);
|
||||
|
Loading…
Reference in New Issue
Block a user