=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/indent/indent.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- src/usr.bin/indent/indent.c 2015/10/09 01:37:07 1.29 +++ src/usr.bin/indent/indent.c 2015/11/11 01:12:09 1.30 @@ -1,4 +1,4 @@ -/* $OpenBSD: indent.c,v 1.29 2015/10/09 01:37:07 deraadt Exp $ */ +/* $OpenBSD: indent.c,v 1.30 2015/11/11 01:12:09 deraadt Exp $ */ /* * Copyright (c) 1980, 1993 @@ -1184,7 +1184,7 @@ errc(1, ENAMETOOLONG, "%s.BAK", p); /* copy in_name to backup file */ - bakchn = creat(bakfile, 0600); + bakchn = open(bakfile, O_CREAT | O_TRUNC | O_WRONLY, 0600); if (bakchn < 0) err(1, "%s", bakfile); while ((n = read(fileno(input), buff, sizeof buff)) > 0)