-# $Id: Makefile.dist,v 1.1.1.1 1999/05/02 04:21:18 wsanchez Exp $
+# $Id: Makefile.dist,v 1.1 1999/05/02 04:21:18 wsanchez Exp $
PROG= at
SRCS= at.c panic.c parsetime.c
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $Id: atrun.8,v 1.1.1.1 1999/05/02 04:21:19 wsanchez Exp $
+.\" $Id: atrun.8,v 1.1 1999/05/02 04:21:19 wsanchez Exp $
.\"
.Dd December 5, 1993
.Dt ATRUN 8
#include <getopt.h>
#endif
-#if (MAXLOGNAME-1) > UT_NAMESIZE
-#define LOGNAMESIZE UT_NAMESIZE
-#else
#define LOGNAMESIZE (MAXLOGNAME-1)
-#endif
/* Local headers */
pid_t pid;
int fd_out, fd_in;
int queue;
- char mailbuf[LOGNAMESIZE + 1], fmt[49];
+ char mailbuf[LOGNAMESIZE + 1];
+ char *fmt = NULL;
char *mailname = NULL;
FILE *stream;
int send_mail = 0;
fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC);
- snprintf(fmt, sizeof(fmt),
- "#!/bin/sh\n# atrun uid=%%ld gid=%%ld\n# mail %%%ds %%d",
- LOGNAMESIZE);
+ asprintf(&fmt, "%s%d%s",
+ "#!/bin/sh\n# atrun uid=%ld gid=%ld\n# mail %",
+ LOGNAMESIZE,
+ "s %d");
if (fscanf(stream, fmt, &nuid, &ngid, mailbuf, &send_mail) != 4) {
syslog(LOG_ERR,"File %s is in wrong format - aborting", filename);
exit(EXIT_FAILURE);
}
+ free(fmt);
if (mailbuf[0] == '-') {
syslog(LOG_ERR,"illegal mail name %s in %s",mailbuf,filename);
exit(EXIT_FAILURE);
.\" SUCH DAMAGE.
.\"
.\" from: @(#)getty.8 8.1 (Berkeley) 6/4/93
-.\" $Id: getty.8,v 1.1.1.1 1999/05/02 04:21:29 wsanchez Exp $
+.\" $Id: getty.8,v 1.1 1999/05/02 04:21:29 wsanchez Exp $
.\"
.Dd June 4, 1993
.Dt GETTY 8
.\" SUCH DAMAGE.
.\"
.\" from: @(#)gettytab.5 8.4 (Berkeley) 4/19/94
-.\" $Id: gettytab.5,v 1.1.1.1 1999/05/02 04:21:29 wsanchez Exp $
+.\" $Id: gettytab.5,v 1.1 1999/05/02 04:21:29 wsanchez Exp $
.\"
.Dd April 19, 1994
.Dt GETTYTAB 5
.\" SUCH DAMAGE.
.\"
.\" from: @(#)ttys.5 8.1 (Berkeley) 6/4/93
-.\" $Id: ttys.5,v 1.1.1.1 1999/05/02 04:21:29 wsanchez Exp $
+.\" $Id: ttys.5,v 1.1 1999/05/02 04:21:29 wsanchez Exp $
.\"
.Dd June 4, 1993
.Dt TTYS 5