1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-28 10:08:24 +00:00
freebsd-ports/misc/mc/files/patch-vfs-names.c
Max Khon 694ecd186a - Fix CAN-2004-0226, CAN-2004-0231, CAN-2004-0232.
- Do not use :: in patch file names.
- Patch for CAN-2003-1023 is now contained in patch-vfs-direntry.c.
- Bump PORTREVISION.

Submitted by:	Jakub Jelinek <jakub@redhat.com>
2004-06-14 20:56:00 +00:00

29 lines
760 B
C

--- vfs/names.c.orig Fri Nov 15 12:19:34 2002
+++ vfs/names.c Tue Jun 15 03:15:09 2004
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <pwd.h>
#include <grp.h>
+#include <glib.h>
#include "names.h"
@@ -59,7 +60,7 @@
if (uname[0] != saveuname[0] /* Quick test w/o proc call */
||0 != strncmp (uname, saveuname, TUNMLEN)) {
- strncpy (saveuname, uname, TUNMLEN);
+ g_strlcpy (saveuname, uname, TUNMLEN);
pw = getpwnam (uname);
if (pw) {
saveuid = pw->pw_uid;
@@ -77,7 +78,7 @@
if (gname[0] != savegname[0] /* Quick test w/o proc call */
||0 != strncmp (gname, savegname, TUNMLEN)) {
- strncpy (savegname, gname, TUNMLEN);
+ g_strlcpy (savegname, gname, TUNMLEN);
gr = getgrnam (gname);
if (gr) {
savegid = gr->gr_gid;