4.5 not released yet, I'm starting ultra early on stable ports fixes
this time round. This is against a OPENBSD_4_5 tagged tree.
Update to netatalk-2.0.4beta2 for CVE-2008-5718.
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5718
"The papd daemon in Netatalk before 2.0.4-beta2, when using certain
variables in a pipe command for the print file, allows remote attackers
to execute arbitrary commands via shell metacharacters in a print
request, as demonstrated using a crafted Title"
The attached patch will remove 2 files from the patches directory.
patches/patch-bin_cnid_cnid_index_c
patches/patch-etc_cnid_dbd_dbif_c
Use patch -E when applying diff.
Ian McWilliam
cvs server: Diffing inside .
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/netatalk/Makefile,v
retrieving revision 1.23
diff -N -u -r1.23 Makefile
--- Makefile 26 Oct 2007 14:27:23 -0000 1.23
+++ Makefile 4 Mar 2009 21:06:52 -0000
@@ -2,8 +2,8 @@
COMMENT= AFP file and print services for AppleTalk/IP networks
-DISTNAME= netatalk-2.0.3
-PKGNAME= ${DISTNAME}p2
+DISTNAME= netatalk-2.0.4beta2
+PKGNAME= ${DISTNAME}
CATEGORIES= net
HOMEPAGE= http://netatalk.sourceforge.net/
@@ -55,8 +55,7 @@
${INSTALL_DATA} ${WRKSRC}/COPYRIGHT ${WRKSRC}/COPYING\
${PREFIX}/share/doc/netatalk
-.for i in FAQ README.hidden-items README.platforms README.logger \
- README.ids Netatalk-Manual.txt Netatalk-Manual.pdf
+.for i in FAQ README.hidden-items README.platforms
${INSTALL_DATA} ${WRKSRC}/doc/$i ${PREFIX}/share/doc/netatalk
.endfor
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/netatalk/distinfo,v
retrieving revision 1.4
diff -N -u -r1.4 distinfo
--- distinfo 5 Apr 2007 16:20:11 -0000 1.4
+++ distinfo 4 Mar 2009 21:06:52 -0000
@@ -1,5 +1,5 @@
-MD5 (netatalk-2.0.3.tar.gz) = F5F6vX0lXSMcwMYYjM0n+w==
-RMD160 (netatalk-2.0.3.tar.gz) = VdEgzZeooQ+ewRL0P5lS+6ygNKM=
-SHA1 (netatalk-2.0.3.tar.gz) = X5TZaR4UzPZuN2ZK/HO7DDG8hDc=
-SHA256 (netatalk-2.0.3.tar.gz) = tuAc/AtCI/YP2ZTu6VBjWxZdVKls9ju+YHpf9kNVvYw=
-SIZE (netatalk-2.0.3.tar.gz) = 1920570
+MD5 (netatalk-2.0.4beta2.tar.gz) = waEmangXnnWKUXSPTq0cPQ==
+RMD160 (netatalk-2.0.4beta2.tar.gz) = t81Dt06IsLQkGhUbmlSZZc32Xso=
+SHA1 (netatalk-2.0.4beta2.tar.gz) = +oyDAvlTJ0zPXiQ6Q7r0SPJKtRg=
+SHA256 (netatalk-2.0.4beta2.tar.gz) =
gvqZNFE4crHfHeVPGg29dSu0XRddEWuocOC7tExvGPc=
+SIZE (netatalk-2.0.4beta2.tar.gz) = 1340353
cvs server: Diffing inside patches
Index: patches/patch-bin_megatron_nad_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-bin_megatron_nad_c,v
retrieving revision 1.2
diff -N -u -r1.2 patches/patch-bin_megatron_nad_c
--- patches/patch-bin_megatron_nad_c 25 Oct 2007 18:57:32 -0000 1.2
+++ patches/patch-bin_megatron_nad_c 4 Mar 2009 21:06:52 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-bin_megatron_nad_c,v 1.2 2007/10/25 18:57:32 steven Exp $
---- bin/megatron/nad.c.orig Thu Feb 10 02:23:08 2005
-+++ bin/megatron/nad.c Thu Oct 25 20:30:05 2007
-@@ -414,8 +414,8 @@ void select_charset( int options)
+--- bin/megatron/nad.c.orig Tue Sep 19 10:08:00 2006
++++ bin/megatron/nad.c Sat Feb 7 23:53:28 2009
+@@ -412,8 +412,8 @@ void select_charset( int options)
#endif /* HEXOUTPUT */
struct nad_file_data {
@@ -12,7 +12,7 @@
int offset[ NUMFORKS ];
struct adouble ad;
} nad;
-@@ -451,9 +451,10 @@ int nad_open( path, openflags, fh, options )
+@@ -449,9 +449,10 @@ int nad_open( path, openflags, fh, options )
if ( openflags == O_RDONLY ) {
initvol(path);
@@ -26,7 +26,7 @@
for ( fork = 0 ; fork < NUMFORKS ; fork++ ) {
if ( stat( nad.adpath[ fork ], &st ) < 0 ) {
if ( errno == ENOENT ) {
-@@ -478,10 +479,11 @@ int nad_open( path, openflags, fh, options )
+@@ -476,10 +477,11 @@ int nad_open( path, openflags, fh, options )
} else {
initvol (".");
@@ -42,7 +42,7 @@
#if DEBUG
fprintf(stderr, "%s\n", nad.macname);
fprintf(stderr, "%s is adpath[0]\n", nad.adpath[0]);
-@@ -512,7 +514,7 @@ int nad_header_read( fh )
+@@ -510,7 +512,7 @@ int nad_header_read( fh )
memcpy( nad.macname, ad_entry( &nad.ad, ADEID_NAME ),
ad_getentrylen( &nad.ad, ADEID_NAME ));
nad.macname[ ad_getentrylen( &nad.ad, ADEID_NAME ) ] = '\0';
@@ -51,7 +51,7 @@
#endif
/* just in case there's nothing in macname */
-@@ -521,9 +523,9 @@ int nad_header_read( fh )
+@@ -519,9 +521,9 @@ int nad_header_read( fh )
p = nad.adpath[DATA];
else p++;
#if 0
Index: patches/patch-bin_psorder_psorder_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-bin_psorder_psorder_c,v
retrieving revision 1.1
diff -N -u -r1.1 patches/patch-bin_psorder_psorder_c
--- patches/patch-bin_psorder_psorder_c 22 Sep 2006 05:56:25 -0000 1.1
+++ patches/patch-bin_psorder_psorder_c 4 Mar 2009 21:06:52 -0000
@@ -1,31 +1,30 @@
$OpenBSD: patch-bin_psorder_psorder_c,v 1.1 2006/09/22 05:56:25 pvalchev Exp $
---- bin/psorder/psorder.c.orig Fri Jun 29 10:14:46 2001
-+++ bin/psorder/psorder.c Sat Dec 31 11:48:01 2005
+--- bin/psorder/psorder.c.orig Sat Feb 7 23:28:23 2009
++++ bin/psorder/psorder.c Sat Feb 7 23:34:39 2009
@@ -151,7 +151,7 @@ filesetup( inputfile, infd, tfile, tfd )
make temporary file
*/
-- (void *)strncpy( tfile, template, MAXNAMLEN );
-+ (void *)strlcpy( tfile, template, MAXNAMLEN );
+- strncpy( tfile, template, MAXNAMLEN );
++ strlcpy( tfile, template, MAXNAMLEN );
if (( *tfd = mkstemp( tfile )) == -1 ) {
fprintf( stderr, "can't create temporary file %s\n", tfile );
filecleanup( -1, -1, "" );
-@@ -391,11 +391,12 @@ writeps( tempfd, tempfile )
+@@ -391,11 +391,11 @@ writeps( tempfd, tempfile )
} else if (( strncmp( psinfo.pages.order, "", ORDERLEN ) == 0 ) ||
( strncmp( psinfo.pages.order, "1", ORDERLEN ) == 0 )) {
order = orderflag;
- if ( order == REVERSE ) strcpy( psinfo.pages.order, "-1" );
-+ if ( order == REVERSE )
-+ strlcpy( psinfo.pages.order, "-1", sizeof(psinfo.pages.order) );
++ if ( order == REVERSE ) strlcpy( psinfo.pages.order, "-1",
sizeof(psinfo.pages.order));
} else if ( strncmp( psinfo.pages.order, "-1", ORDERLEN ) == 0 ) {
if ( orderflag == FORWARD ) {
order = REVERSE;
- strcpy( psinfo.pages.order, "1" );
-+ strlcpy( psinfo.pages.order, "1", sizeof(psinfo.pages.order) );
++ strlcpy( psinfo.pages.order, "1", sizeof(psinfo.pages.order));
} else order = FORWARD;
} else if (( strncmp( psinfo.pages.order, "0", ORDERLEN ) == 0 ) &&
forceflag ) {
-@@ -481,7 +482,7 @@ writelable( tempfd, tempfile, lable )
+@@ -481,7 +481,7 @@ writelable( tempfd, tempfile, lable )
} else {
argone = argtwo = NULL;
}
Index: patches/patch-etc_afpd_auth_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_afpd_auth_c,v
retrieving revision 1.2
diff -N -u -r1.2 patches/patch-etc_afpd_auth_c
--- patches/patch-etc_afpd_auth_c 25 Oct 2007 18:57:32 -0000 1.2
+++ patches/patch-etc_afpd_auth_c 4 Mar 2009 21:06:52 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-etc_afpd_auth_c,v 1.2 2007/10/25 18:57:32 steven Exp $
---- etc/afpd/auth.c.orig Fri Mar 11 16:36:58 2005
-+++ etc/afpd/auth.c Thu Oct 25 20:30:05 2007
-@@ -244,7 +244,7 @@ static int login(AFPObj *obj, struct passwd *pwd, void
+--- etc/afpd/auth.c.orig Tue Sep 27 20:40:41 2005
++++ etc/afpd/auth.c Sat Feb 7 23:53:28 2009
+@@ -243,7 +243,7 @@ static int login(AFPObj *obj, struct passwd *pwd, void
int mypid = getpid();
struct stat stat_buf;
@@ -10,7 +10,7 @@
addr_net / 256, addr_net % 256, addr_node);
LOG(log_info, logtype_afpd, "registering %s (uid %d) on %u.%u
as %s",
pwd->pw_name, pwd->pw_uid, addr_net, addr_node, nodename);
-@@ -333,7 +333,7 @@ static int login(AFPObj *obj, struct passwd *pwd, void
+@@ -332,7 +332,7 @@ static int login(AFPObj *obj, struct passwd *pwd, void
else
clientname = inet_ntoa( dsi->client.sin_addr );
@@ -19,7 +19,7 @@
if( sia_become_user( NULL, argc, argv, hostname, pwd->pw_name,
NULL, FALSE, NULL, NULL,
-@@ -999,7 +999,7 @@ int auth_register(const int type, struct uam_obj *uam)
+@@ -998,7 +998,7 @@ int auth_register(const int type, struct uam_obj *uam)
/* load all of the modules */
int auth_load(const char *path, const char *list)
{
@@ -28,7 +28,7 @@
struct uam_mod *mod;
struct stat st;
size_t len;
-@@ -1011,9 +1011,9 @@ int auth_load(const char *path, const char *list)
+@@ -1010,9 +1010,9 @@ int auth_load(const char *path, const char *list)
if ((p = strtok(buf, ",")) == NULL)
return -1;
Index: patches/patch-etc_afpd_directory_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_afpd_directory_c,v
retrieving revision 1.2
diff -N -u -r1.2 patches/patch-etc_afpd_directory_c
--- patches/patch-etc_afpd_directory_c 25 Oct 2007 18:57:32 -0000 1.2
+++ patches/patch-etc_afpd_directory_c 4 Mar 2009 21:06:52 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-etc_afpd_directory_c,v 1.2 2007/10/25 18:57:32 steven Exp $
---- etc/afpd/directory.c.orig Thu Feb 10 02:23:10 2005
-+++ etc/afpd/directory.c Thu Oct 25 20:30:05 2007
-@@ -681,7 +681,7 @@ int netatalk_unlink(const char *name)
+--- etc/afpd/directory.c.orig Wed Nov 26 02:16:32 2008
++++ etc/afpd/directory.c Sat Feb 7 23:53:28 2009
+@@ -679,7 +679,7 @@ int netatalk_unlink(const char *name)
/* ------------------- */
static int deletedir(char *dir)
{
@@ -10,7 +10,7 @@
DIR *dp;
struct dirent *de;
struct stat st;
-@@ -696,8 +696,8 @@ static int deletedir(char *dir)
+@@ -694,8 +694,8 @@ static int deletedir(char *dir)
if ((dp = opendir(dir)) == NULL)
return AFP_OK;
@@ -21,7 +21,7 @@
len++;
remain = sizeof(path) -len -1;
while ((de = readdir(dp)) && err == AFP_OK) {
-@@ -709,7 +709,7 @@ static int deletedir(char *dir)
+@@ -707,7 +707,7 @@ static int deletedir(char *dir)
err = AFPERR_PARAM;
break;
}
@@ -30,7 +30,7 @@
if (stat(path, &st)) {
continue;
}
-@@ -732,7 +732,7 @@ static int deletedir(char *dir)
+@@ -730,7 +730,7 @@ static int deletedir(char *dir)
/* do a recursive copy. */
static int copydir(const struct vol *vol, char *src, char *dst)
{
@@ -39,7 +39,7 @@
DIR *dp;
struct dirent *de;
struct stat st;
-@@ -754,13 +754,13 @@ static int copydir(const struct vol *vol, char *src, c
+@@ -752,13 +752,13 @@ static int copydir(const struct vol *vol, char *src, c
}
/* set things up to copy */
@@ -57,7 +57,7 @@
dlen++;
drem = sizeof(dpath) - dlen -1;
-@@ -774,14 +774,14 @@ static int copydir(const struct vol *vol, char *src, c
+@@ -772,14 +772,14 @@ static int copydir(const struct vol *vol, char *src, c
err = AFPERR_PARAM;
break;
}
@@ -74,7 +74,7 @@
if (S_ISDIR(st.st_mode)) {
if (AFP_OK != (err = copydir(vol, spath, dpath)))
-@@ -969,7 +969,7 @@ struct dir *dir;
+@@ -967,7 +967,7 @@ struct dir *dir;
char **cpath;
{
struct dir *cdir;
@@ -83,7 +83,7 @@
static struct path ret;
char *data, *p;
-@@ -1045,16 +1045,13 @@ char **cpath;
+@@ -1043,16 +1043,13 @@ char **cpath;
if ( movecwd( vol, dir->d_parent ) < 0 ) {
return NULL;
}
@@ -103,7 +103,7 @@
}
/* FIXME should we set :
ret.st_valid = 1;
-@@ -1120,7 +1117,7 @@ char **cpath;
+@@ -1118,7 +1115,7 @@ char **cpath;
afp_errno = AFPERR_PARAM;
return( NULL );
}
@@ -112,7 +112,7 @@
}
/* check for OS X mangled filename :( */
-@@ -1132,8 +1129,8 @@ char **cpath;
+@@ -1130,8 +1127,8 @@ char **cpath;
*/
if ( (t = utompath(vol, ret.u_name, fileid,
utf8_encoding())) ) {
/* at last got our view of mac name */
@@ -123,7 +123,7 @@
}
}
if ( !extend ) {
-@@ -1192,7 +1189,7 @@ int movecwd( vol, dir)
+@@ -1190,7 +1187,7 @@ int movecwd( vol, dir)
const struct vol *vol;
struct dir *dir;
{
@@ -132,7 +132,7 @@
struct dir *d;
char *p, *u;
int n;
-@@ -2111,25 +2108,25 @@ struct dir *dir, *newparent;
+@@ -2109,25 +2106,25 @@ struct dir *dir, *newparent;
if (dir->d_m_name == dir->d_u_name)
dir->d_u_name = NULL;
@@ -162,15 +162,15 @@
}
if (( parent = dir->d_parent ) == NULL ) {
-@@ -2146,7 +2143,6 @@ struct dir *dir, *newparent;
+@@ -2144,7 +2141,6 @@ struct dir *dir, *newparent;
return( AFP_OK );
}
-#define DOT_APPLEDOUBLE_LEN 13
/* delete an empty directory */
- int deletecurdir( vol, path, pathlen )
+ int deletecurdir( vol, path )
const struct vol *vol;
-@@ -2200,7 +2196,7 @@ int pathlen;
+@@ -2197,7 +2193,7 @@ char *path;
return AFPERR_DIRNEMPT;
}
Index: patches/patch-etc_afpd_file_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_afpd_file_c,v
retrieving revision 1.1
diff -N -u -r1.1 patches/patch-etc_afpd_file_c
--- patches/patch-etc_afpd_file_c 22 Sep 2006 05:56:25 -0000 1.1
+++ patches/patch-etc_afpd_file_c 4 Mar 2009 21:06:52 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-etc_afpd_file_c,v 1.1 2006/09/22 05:56:25 pvalchev Exp $
---- etc/afpd/file.c.orig Thu Apr 28 05:24:04 2005
-+++ etc/afpd/file.c Fri Dec 30 23:30:05 2005
-@@ -1026,7 +1026,7 @@ const struct vol *vol;
+--- etc/afpd/file.c.orig Wed Nov 26 02:16:33 2008
++++ etc/afpd/file.c Sat Feb 7 23:53:28 2009
+@@ -1029,7 +1029,7 @@ const struct vol *vol;
char *src, *dst, *newname;
struct adouble *adp;
{
@@ -10,7 +10,7 @@
int rc;
#ifdef DEBUG
-@@ -1061,7 +1061,7 @@ struct adouble *adp;
+@@ -1064,7 +1064,7 @@ struct adouble *adp;
}
}
Index: patches/patch-etc_afpd_mangle_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_afpd_mangle_c,v
retrieving revision 1.2
diff -N -u -r1.2 patches/patch-etc_afpd_mangle_c
--- patches/patch-etc_afpd_mangle_c 25 Oct 2007 18:57:32 -0000 1.2
+++ patches/patch-etc_afpd_mangle_c 4 Mar 2009 21:06:53 -0000
@@ -1,16 +1,16 @@
$OpenBSD: patch-etc_afpd_mangle_c,v 1.2 2007/10/25 18:57:32 steven Exp $
---- etc/afpd/mangle.c.orig Mon Feb 14 17:01:54 2005
-+++ etc/afpd/mangle.c Thu Oct 25 20:30:05 2007
-@@ -235,7 +235,7 @@ unsigned char *
- mangle(const struct vol *vol, unsigned char *filename, size_t filenamelen,
unsigned char *uname, cnid_t id, int flags) {
- unsigned char *ext = NULL;
- unsigned char *m = NULL;
-- static unsigned char mfilename[MAXPATHLEN + 1];
-+ static unsigned char mfilename[MAXPATHLEN];
- unsigned char mangle_suffix[MANGLE_LENGTH + 1];
+--- etc/afpd/mangle.c.orig Sat Feb 7 23:36:02 2009
++++ etc/afpd/mangle.c Sat Feb 7 23:43:34 2009
+@@ -235,7 +235,7 @@ char *
+ mangle(const struct vol *vol _U_, char *filename, size_t filenamelen, char
*uname, cnid_t id, int flags) {
+ char *ext = NULL;
+ char *m = NULL;
+- static char mfilename[MAXPATHLEN + 1];
++ static char mfilename[MAXPATHLEN];
+ char mangle_suffix[MANGLE_LENGTH + 1];
size_t ext_len = 0;
size_t maxlen;
-@@ -259,19 +259,19 @@ mangle(const struct vol *vol, unsigned char *filename,
+@@ -259,19 +259,19 @@ mangle(const struct vol *vol _U_, char *filename, size
ext_len = MAX_EXT_LENGTH;
}
}
@@ -19,8 +19,8 @@
+ k = snprintf(mangle_suffix, sizeof(mangle_suffix), "%c%X", MANGLE_CHAR,
ntohl(id));
- strlcpy(m, filename, maxlen - k - ext_len +1);
-+ strlcpy(mfilename, filename, maxlen - k - ext_len +1);
-+ m = mfilename;
++ strlcpy(mfilename, filename, maxlen - k - ext_len +1);
++ m = mfilename;
if (flags & 2)
m = utf8_mangle_validate(m, maxlen - k - ext_len +1);
if (*m == 0) {
Index: patches/patch-etc_afpd_ofork_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_afpd_ofork_c,v
retrieving revision 1.1
diff -N -u -r1.1 patches/patch-etc_afpd_ofork_c
--- patches/patch-etc_afpd_ofork_c 22 Sep 2006 05:56:25 -0000 1.1
+++ patches/patch-etc_afpd_ofork_c 4 Mar 2009 21:06:53 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-etc_afpd_ofork_c,v 1.1 2006/09/22 05:56:25 pvalchev Exp $
---- etc/afpd/ofork.c.orig Wed Feb 9 20:23:15 2005
-+++ etc/afpd/ofork.c Sat Dec 31 00:29:55 2005
-@@ -289,7 +289,7 @@ int ret;
+--- etc/afpd/ofork.c.orig Wed Nov 26 02:16:33 2008
++++ etc/afpd/ofork.c Sat Feb 7 23:53:28 2009
+@@ -295,7 +295,7 @@ int ret;
/* -------------------------- */
int of_statdir (const struct vol *vol, struct path *path)
{
@@ -10,7 +10,7 @@
int ret;
if (*path->m_name) {
-@@ -299,8 +299,8 @@ int ret;
+@@ -305,8 +305,8 @@ int ret;
path->st_errno = 0;
path->st_valid = 1;
/* FIXME, what about: we don't have r-x perm anymore ? */
Index: patches/patch-etc_afpd_unix_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_afpd_unix_c,v
retrieving revision 1.2
diff -N -u -r1.2 patches/patch-etc_afpd_unix_c
--- patches/patch-etc_afpd_unix_c 25 Oct 2007 18:57:32 -0000 1.2
+++ patches/patch-etc_afpd_unix_c 4 Mar 2009 21:06:53 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-etc_afpd_unix_c,v 1.2 2007/10/25 18:57:32 steven Exp $
---- etc/afpd/unix.c.orig Wed Jun 16 00:53:55 2004
-+++ etc/afpd/unix.c Thu Oct 25 20:30:05 2007
-@@ -342,8 +342,8 @@ const mode_t mode;
+--- etc/afpd/unix.c.orig Wed Nov 26 02:16:33 2008
++++ etc/afpd/unix.c Sat Feb 7 23:53:28 2009
+@@ -344,8 +344,8 @@ const mode_t mode;
strcmp( deskp->d_name, ".." ) == 0 || strlen( deskp->d_name )
> 2 ) {
continue;
}
@@ -12,7 +12,7 @@
m = strchr( modbuf, '\0' );
if (( sub = opendir( deskp->d_name )) == NULL ) {
continue;
-@@ -354,7 +354,7 @@ const mode_t mode;
+@@ -356,7 +356,7 @@ const mode_t mode;
continue;
}
*m = '\0';
@@ -21,16 +21,16 @@
/* XXX: need to preserve special modes */
if (stat(modbuf, &st) < 0) {
LOG(log_error, logtype_afpd, "setdeskmode: stat %s:
%s",fullpathname(modbuf), strerror(errno) );
-@@ -471,7 +471,7 @@ const struct vol *vol;
+@@ -476,7 +476,7 @@ const struct vol *vol;
const char *name;
- const mode_t mode;
+ mode_t mode;
{
- char buf[ MAXPATHLEN + 1];
+ char buf[ MAXPATHLEN];
struct stat st;
char *m;
struct dirent *dirp;
-@@ -540,8 +540,8 @@ const mode_t mode;
+@@ -548,8 +548,8 @@ mode_t mode;
LOG(log_error, logtype_afpd, "setdirmode: opendir %s: %s",
fullpathname(".AppleDouble"),strerror(errno) );
return( -1 );
}
@@ -41,7 +41,7 @@
m = strchr( buf, '\0' );
for ( dirp = readdir( dir ); dirp != NULL; dirp = readdir( dir )) {
if ( strcmp( dirp->d_name, "." ) == 0 ||
-@@ -549,7 +549,7 @@ const mode_t mode;
+@@ -557,7 +557,7 @@ mode_t mode;
continue;
}
*m = '\0';
@@ -50,7 +50,7 @@
if ( stat( buf, &st ) < 0 ) {
LOG(log_error, logtype_afpd, "setdirmode: stat %s: %s", buf,
strerror(errno) );
-@@ -582,7 +582,7 @@ int setdeskowner( uid, gid )
+@@ -590,7 +590,7 @@ int setdeskowner( uid, gid )
const uid_t uid;
const gid_t gid;
{
@@ -59,7 +59,7 @@
char modbuf[12 + 1], *m;
struct dirent *deskp, *subp;
DIR *desk, *sub;
-@@ -605,8 +605,8 @@ const gid_t gid;
+@@ -613,8 +613,8 @@ const gid_t gid;
strlen( deskp->d_name ) > 2 ) {
continue;
}
@@ -70,7 +70,7 @@
m = strchr( modbuf, '\0' );
if (( sub = opendir( deskp->d_name )) == NULL ) {
continue;
-@@ -617,7 +617,7 @@ const gid_t gid;
+@@ -625,7 +625,7 @@ const gid_t gid;
continue;
}
*m = '\0';
@@ -79,7 +79,7 @@
/* XXX: add special any uid, ignore group bits */
if ( chown( modbuf, uid, gid ) < 0 && errno != EPERM ) {
LOG(log_error, logtype_afpd, "setdeskown: chown %s: %s",
fullpathname(modbuf), strerror(errno) );
-@@ -692,7 +692,7 @@ const char *name;
+@@ -700,7 +700,7 @@ const char *name;
const uid_t uid;
const gid_t gid;
{
@@ -88,7 +88,7 @@
struct stat st;
char *m;
struct dirent *dirp;
-@@ -735,16 +735,16 @@ const gid_t gid;
+@@ -743,16 +743,16 @@ const gid_t gid;
goto setdirowner_noadouble;
return( -1 );
}
@@ -109,7 +109,7 @@
if ( chown( buf, uid, gid ) < 0 && errno != EPERM ) {
LOG(log_debug, logtype_afpd, "setdirowner: chown %d/%d %s: %s",
uid, gid, fullpathname(buf), strerror(errno) );
-@@ -788,8 +788,8 @@ static int recursive_chown(const char *path, uid_t uid
+@@ -796,8 +796,8 @@ static int recursive_chown(const char *path, uid_t uid
struct dirent *entry;
char *name;
int ret = 0;
@@ -120,7 +120,7 @@
if (chown(path, uid, gid) < 0) {
LOG(log_error, logtype_afpd, "cannot chown() file [%s] (uid = %d):
%s", path, uid, strerror(errno));
-@@ -831,7 +831,7 @@ recursive_chown_end:
+@@ -839,7 +839,7 @@ recursive_chown_end:
int unix_rename(const char *oldpath, const char *newpath)
{
#if 0
@@ -129,7 +129,7 @@
int i;
struct stat pd_stat;
uid_t uid;
-@@ -840,7 +840,7 @@ int unix_rename(const char *oldpath, const char *newpa
+@@ -848,7 +848,7 @@ int unix_rename(const char *oldpath, const char *newpa
if (rename(oldpath, newpath) < 0)
return -1;
#if 0
Index: patches/patch-etc_afpd_volume_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_afpd_volume_c,v
retrieving revision 1.2
diff -N -u -r1.2 patches/patch-etc_afpd_volume_c
--- patches/patch-etc_afpd_volume_c 25 Oct 2007 18:57:32 -0000 1.2
+++ patches/patch-etc_afpd_volume_c 4 Mar 2009 21:06:53 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-etc_afpd_volume_c,v 1.2 2007/10/25 18:57:32 steven Exp $
---- etc/afpd/volume.c.orig Mon Apr 25 00:26:31 2005
-+++ etc/afpd/volume.c Thu Oct 25 20:30:05 2007
-@@ -231,13 +231,14 @@ static char *volxlate(AFPObj *obj, char *dest, size_t
+--- etc/afpd/volume.c.orig Wed Nov 26 02:16:33 2008
++++ etc/afpd/volume.c Sat Feb 7 23:53:28 2009
+@@ -234,13 +234,14 @@ static char *volxlate(AFPObj *obj, char *dest, size_t
return NULL;
}
if (!dest) {
@@ -18,7 +18,7 @@
if ((p = strchr(src, '$')) == NULL) /* nothing to do */
return ret;
-@@ -262,7 +263,7 @@ static char *volxlate(AFPObj *obj, char *dest, size_t
+@@ -265,7 +266,7 @@ static char *volxlate(AFPObj *obj, char *dest, size_t
if (obj->proto == AFPPROTO_ASP) {
ASP asp = obj->handle;
@@ -27,7 +27,7 @@
asp->asp_sat.sat_addr.s_node);
dest += len;
destlen -= len;
-@@ -270,7 +271,7 @@ static char *volxlate(AFPObj *obj, char *dest, size_t
+@@ -273,7 +274,7 @@ static char *volxlate(AFPObj *obj, char *dest, size_t
} else if (obj->proto == AFPPROTO_DSI) {
DSI *dsi = obj->handle;
@@ -36,7 +36,7 @@
ntohs(dsi->client.sin_port));
dest += len;
destlen -= len;
-@@ -291,7 +292,7 @@ static char *volxlate(AFPObj *obj, char *dest, size_t
+@@ -294,7 +295,7 @@ static char *volxlate(AFPObj *obj, char *dest, size_t
if (obj->proto == AFPPROTO_ASP) {
ASP asp = obj->handle;
@@ -45,7 +45,7 @@
dest += len;
destlen -= len;
-@@ -606,14 +607,13 @@ static int creatvol(AFPObj *obj, struct passwd *pwd,
+@@ -617,14 +618,13 @@ static int creatvol(AFPObj *obj, struct passwd *pwd,
free(volume);
return -1;
}
@@ -61,7 +61,7 @@
#ifdef __svr4__
volume->v_qfd = -1;
-@@ -910,8 +910,8 @@ int user;
+@@ -928,8 +928,8 @@ int user;
struct passwd *pwent;
{
FILE *fp;
@@ -72,7 +72,7 @@
type[ 5 ], creator[ 5 ];
char *u, *p;
struct passwd *pw;
-@@ -923,10 +923,10 @@ struct passwd *pwent;
+@@ -941,10 +941,10 @@ struct passwd *pwent;
if (!p1->name)
return -1;
p1->mtime = 0;
@@ -86,7 +86,7 @@
if (p1->full_name) {
free(p1->full_name);
}
-@@ -942,9 +942,9 @@ struct passwd *pwent;
+@@ -960,9 +960,9 @@ struct passwd *pwent;
}
memset(save_options, 0, sizeof(save_options));
@@ -98,7 +98,7 @@
switch ( *path ) {
case '\0' :
case '#' :
-@@ -955,10 +955,10 @@ struct passwd *pwent;
+@@ -973,10 +973,10 @@ struct passwd *pwent;
if (strncmp(path, VOLOPT_DEFAULT, VOLOPT_DEFAULT_LEN) == 0) {
*tmp = '\0';
for (i = 0; i < VOLOPT_NUM; i++) {
@@ -111,7 +111,7 @@
path + VOLOPT_DEFAULT_LEN);
}
}
-@@ -976,10 +976,10 @@ struct passwd *pwent;
+@@ -994,10 +994,10 @@ struct passwd *pwent;
if ( u == NULL || *u == '\0' || ( pw = getpwnam( u )) == NULL ) {
continue;
}
@@ -125,7 +125,7 @@
}
/* Tag a user's home directory with their umask. Note, this will
* be overwritten if the user actually specifies a umask: option
-@@ -990,7 +990,7 @@ struct passwd *pwent;
+@@ -1008,7 +1008,7 @@ struct passwd *pwent;
case '/' :
/* send path through variable substitution */
if (*path != '~') /* need to copy path to tmp */
@@ -134,7 +134,7 @@
if (!pwent)
pwent = getpwnam(obj->username);
volxlate(obj, path, sizeof(path) - 1, tmp, pwent, NULL, NULL);
-@@ -1019,10 +1019,10 @@ struct passwd *pwent;
+@@ -1037,10 +1037,10 @@ struct passwd *pwent;
/* read in up to VOLOP_NUM possible options */
for (i = 0; i < VOLOPT_NUM; i++) {
@@ -147,7 +147,7 @@
}
/* check allow/deny lists:
-@@ -2103,9 +2103,9 @@ static int create_special_folder (const struct vol *vo
+@@ -2128,9 +2128,9 @@ static int create_special_folder (const struct vol *vo
u_int16_t attr;
struct stat st;
int ret;
@@ -159,7 +159,7 @@
if ( p == NULL) {
LOG(log_error, logtype_afpd,"malloc failed");
exit (EXITERR_SYS);
-@@ -2117,8 +2117,8 @@ static int create_special_folder (const struct vol *vo
+@@ -2142,8 +2142,8 @@ static int create_special_folder (const struct vol *vo
exit (EXITERR_SYS);
}
@@ -170,7 +170,7 @@
r=q;
while (*r) {
-@@ -2128,7 +2128,7 @@ static int create_special_folder (const struct vol *vo
+@@ -2153,7 +2153,7 @@ static int create_special_folder (const struct vol *vo
*r=tolower(*r);
r++;
}
@@ -179,7 +179,7 @@
if ( (ret = stat( p, &st )) < 0 ) {
if (folder->precreate) {
-@@ -2259,7 +2259,7 @@ static int savevoloptions (const struct vol *vol)
+@@ -2284,7 +2284,7 @@ static int savevoloptions (const struct vol *vol)
snprintf(item, sizeof(item), "CNIDDBDPORT:%u\n", Cnid_port);
strlcat(buf, item, sizeof(buf));
@@ -188,7 +188,7 @@
if (vol->v_dbpath)
strlcat(item, vol->v_dbpath, sizeof(item));
else
-@@ -2268,7 +2268,7 @@ static int savevoloptions (const struct vol *vol)
+@@ -2293,7 +2293,7 @@ static int savevoloptions (const struct vol *vol)
strlcat(buf, item, sizeof(buf));
/* volume flags */
@@ -197,7 +197,7 @@
for (;op->name; op++) {
if ( (vol->v_flags & op->option) ) {
strlcat(item, op->name, sizeof(item));
-@@ -2279,7 +2279,7 @@ static int savevoloptions (const struct vol *vol)
+@@ -2304,7 +2304,7 @@ static int savevoloptions (const struct vol *vol)
strlcat(buf, item, sizeof(buf));
/* casefold flags */
Index: patches/patch-etc_atalkd_config_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_atalkd_config_c,v
retrieving revision 1.1
diff -N -u -r1.1 patches/patch-etc_atalkd_config_c
--- patches/patch-etc_atalkd_config_c 22 Sep 2006 05:56:25 -0000 1.1
+++ patches/patch-etc_atalkd_config_c 4 Mar 2009 21:06:53 -0000
@@ -1,21 +1,18 @@
$OpenBSD: patch-etc_atalkd_config_c,v 1.1 2006/09/22 05:56:25 pvalchev Exp $
---- etc/atalkd/config.c.orig Sun Feb 6 05:16:02 2005
-+++ etc/atalkd/config.c Sat Dec 31 01:17:42 2005
+--- etc/atalkd/config.c.orig Sat Feb 7 23:44:09 2009
++++ etc/atalkd/config.c Sat Feb 7 23:52:23 2009
@@ -101,12 +101,11 @@ char **parseline(const char *line)
return NULL;
}
- buffer = (char *) malloc( strlen( p ) + 1 );
- if ( !buffer ) {
-- /* FIXME: error handling */
-- return NULL;
-- }
-- strcpy( buffer, p );
+ buffer = strdup(p);
-+ if (buffer == NULL) {
-+ /* FIXME: error handling */
-+ return NULL;
-+ }
++ if (buffer == NULL) {
+ /* FIXME: error handling */
+ return NULL;
+ }
+- strcpy( buffer, p );
tmpbuf = buffer;
argv = (char **) malloc( ARGV_CHUNK_SIZE * sizeof( char * ) );
@@ -24,7 +21,7 @@
if (( p = strrchr( path, '/' )) == NULL ) {
- strcpy( newpath, _PATH_ATALKDTMP );
-+ strlcpy( newpath, _PATH_ATALKDTMP, sizeof(newpath) );
++ strlcpy(newpath, _PATH_ATALKDTMP, sizeof(newpath));
} else {
- sprintf( newpath, "%.*s/%s", (int)(p - path), path, _PATH_ATALKDTMP );
+ snprintf( newpath, sizeof(newpath), "%.*s/%s", (int)(p - path), path,
_PATH_ATALKDTMP );
@@ -35,12 +32,12 @@
int plumb()
{
struct interface *iface;
-- char device[ MAXPATHLEN + 1], *p;
-+ char device[ MAXPATHLEN ], *p;
+- char device[ MAXPATHLEN + 1], *p, *t;
++ char device[MAXPATHLEN], *p, *t;
int fd, ppa;
+ int digits = 0;
- for ( iface = interfaces; iface != NULL; iface = iface->i_next ) {
-@@ -840,8 +839,8 @@ int plumb()
+@@ -841,8 +840,8 @@ int plumb()
continue;
}
@@ -48,6 +45,6 @@
- strcat( device, iface->i_name );
+ strlcpy( device, "/dev/", sizeof(device) );
+ strlcat( device, iface->i_name, sizeof(device) );
- if (( p = strpbrk( device, "0123456789" )) == NULL ) {
- LOG(log_error, logtype_atalkd, "plumb: invalid device: %s", device
);
- return -1;
+ for (t = device; *t != '\0' ; ++t) {
+ if (isdigit(*t) == 0) {
+ p = t + 1;
Index: patches/patch-etc_cnid_dbd_cnid_metad_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_cnid_dbd_cnid_metad_c,v
retrieving revision 1.2
diff -N -u -r1.2 patches/patch-etc_cnid_dbd_cnid_metad_c
--- patches/patch-etc_cnid_dbd_cnid_metad_c 25 Oct 2007 18:57:32 -0000
1.2
+++ patches/patch-etc_cnid_dbd_cnid_metad_c 4 Mar 2009 21:06:53 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-etc_cnid_dbd_cnid_metad_c,v 1.2 2007/10/25 18:57:32 steven Exp
$
---- etc/cnid_dbd/cnid_metad.c.orig Mon Sep 6 09:19:21 2004
-+++ etc/cnid_dbd/cnid_metad.c Thu Oct 25 20:30:06 2007
-@@ -270,8 +270,8 @@ static int maybe_start_dbd(char *dbdpn, char *dbdir, c
+--- etc/cnid_dbd/cnid_metad.c.orig Sun Aug 31 19:52:14 2008
++++ etc/cnid_dbd/cnid_metad.c Sun Feb 8 00:01:58 2009
+@@ -272,8 +272,8 @@ static int maybe_start_dbd(char *dbdpn, char *dbdir, c
}
}
@@ -12,7 +12,7 @@
if (up->count == MAXSPAWN) {
/* there's a pb with the db inform child
-@@ -298,7 +298,7 @@ static int maybe_start_dbd(char *dbdpn, char *dbdir, c
+@@ -300,7 +300,7 @@ static int maybe_start_dbd(char *dbdpn, char *dbdir, c
}
/* ------------------ */
@@ -21,7 +21,7 @@
{
struct stat st;
-@@ -310,11 +310,11 @@ static int set_dbdir(char *dbdir, int len)
+@@ -312,11 +312,11 @@ static int set_dbdir(char *dbdir, int len)
return -1;
}
@@ -36,16 +36,25 @@
if (stat(dbdir, &st) < 0 && mkdir(dbdir, 0755 ) < 0) {
LOG(log_error, logtype_cnid, "set_dbdir: mkdir failed for %s", dbdir);
return -1;
-@@ -365,7 +365,7 @@ char *group;
+@@ -372,7 +372,7 @@ void catch_alarm(int sig) {
/* ------------------ */
int main(int argc, char *argv[])
{
- char dbdir[MAXPATHLEN + 1];
+ char dbdir[MAXPATHLEN];
- int len;
+ int len, actual_len;
pid_t pid;
int status;
-@@ -529,7 +529,7 @@ int main(int argc, char *argv[])
+@@ -536,7 +536,7 @@ int main(int argc, char *argv[])
+ * checks for buffer overruns. The client libatalk side does it too
+ * before handing the dir path over but who trusts clients?
+ */
+- if (!len || len +DBHOMELEN +2 > MAXPATHLEN) {
++ if (!len || len +DBHOMELEN +2 > (MAXPATHLEN - 1)) {
+ LOG(log_error, logtype_cnid, "wrong len parameter: %d", len);
+ goto loop_end;
+ }
+@@ -555,7 +555,7 @@ int main(int argc, char *argv[])
}
dbdir[len] = '\0';
Index: patches/patch-etc_cnid_dbd_db_param_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_cnid_dbd_db_param_c,v
retrieving revision 1.1
diff -N -u -r1.1 patches/patch-etc_cnid_dbd_db_param_c
--- patches/patch-etc_cnid_dbd_db_param_c 22 Sep 2006 05:56:25 -0000
1.1
+++ patches/patch-etc_cnid_dbd_db_param_c 4 Mar 2009 21:06:53 -0000
@@ -1,12 +1,7 @@
$OpenBSD: patch-etc_cnid_dbd_db_param_c,v 1.1 2006/09/22 05:56:25 pvalchev Exp
$
---- etc/cnid_dbd/db_param.c.orig Tue Dec 21 08:36:12 2004
-+++ etc/cnid_dbd/db_param.c Sat Dec 31 12:34:18 2005
-@@ -43,29 +43,27 @@
- static struct db_param params;
- static int parse_err;
-
--static int usock_maxlen()
-+static size_t usock_maxlen()
+--- etc/cnid_dbd/db_param.c.orig Wed Jun 6 20:18:07 2007
++++ etc/cnid_dbd/db_param.c Sun Feb 8 00:43:20 2009
+@@ -47,7 +47,7 @@ static size_t usock_maxlen()
{
struct sockaddr_un addr;
@@ -14,30 +9,27 @@
+ return sizeof(addr.sun_path);
}
--static int make_pathname(char *path, char *dir, char *fn, int maxlen)
-+static int make_pathname(char *path, char *dir, char *fn, size_t maxlen)
- {
+ static int make_pathname(char *path, char *dir, char *fn, size_t maxlen)
+@@ -55,17 +55,15 @@ static int make_pathname(char *path, char *dir, char *
size_t len;
if (fn[0] != '/') {
- len = strlen(dir);
- if (len + 1 + strlen(fn) > maxlen)
-- return -1;
-- strcpy(path, dir);
+ if ((len = strlcpy(path, dir, maxlen)) >= maxlen)
-+ return -1;
+ return -1;
+- strcpy(path, dir);
if (path[len - 1] != '/')
- strcat(path, "/");
- strcat(path, fn);
+ strlcat(path, "/", maxlen);
+ if (strlcat(path, fn, maxlen) >= maxlen)
-+ return -1;
++ return -1;
} else {
- if (strlen(fn) > maxlen)
-- return -1;
++ if (strlcpy(path, fn, maxlen) >= maxlen)
+ return -1;
- strcpy(path, fn);
-+ if (strlcpy(path, fn, maxlen) >= maxlen)
-+ return -1;
}
return 0;
}
Index: patches/patch-etc_papd_lp_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_papd_lp_c,v
retrieving revision 1.1
diff -N -u -r1.1 patches/patch-etc_papd_lp_c
--- patches/patch-etc_papd_lp_c 22 Sep 2006 05:56:25 -0000 1.1
+++ patches/patch-etc_papd_lp_c 4 Mar 2009 21:06:53 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-etc_papd_lp_c,v 1.1 2006/09/22 05:56:25 pvalchev Exp $
---- etc/papd/lp.c.orig Tue Jun 8 22:24:47 2004
-+++ etc/papd/lp.c Sat Dec 31 01:31:29 2005
-@@ -377,7 +377,7 @@ int lp_init( out, sat )
+--- etc/papd/lp.c.orig Wed Nov 26 02:16:33 2008
++++ etc/papd/lp.c Sat Feb 7 23:53:28 2009
+@@ -409,7 +409,7 @@ int lp_init( out, sat )
FILE *cap_file;
memset( auth_string, 0, 256 );
@@ -10,7 +10,7 @@
printer->p_authprintdir, addr_net/256, addr_net%256,
addr_node);
if (stat(addr_filename, &cap_st) == 0) {
-@@ -489,7 +489,7 @@ int lp_init( out, sat )
+@@ -521,7 +521,7 @@ int lp_init( out, sat )
lp.lp_seq = n;
n = ( n + 1 ) % 1000;
@@ -19,7 +19,7 @@
lseek( fd, 0L, 0 );
write( fd, buf, strlen( buf ));
close( fd );
-@@ -558,7 +558,7 @@ int lp_open( out, sat )
+@@ -590,7 +590,7 @@ int lp_open( out, sat )
}
LOG(log_debug, logtype_papd, "lp_open: opened %s",
pipexlate(printer->p_printer) );
} else {
@@ -27,35 +27,35 @@
+ snprintf( name, sizeof(name), "df%c%03d%s", lp.lp_letter++, lp.lp_seq,
hostname );
if (( fd = open( name, O_WRONLY|O_CREAT|O_EXCL, 0660 )) < 0 ) {
- LOG(log_error, logtype_papd, "lp_open %s: %m", name );
-@@ -719,7 +719,7 @@ int lp_cancel()
+ LOG(log_error, logtype_papd, "lp_open %s: %s", name,
strerror(errno) );
+@@ -751,7 +751,7 @@ int lp_cancel()
}
for ( letter = 'A'; letter < lp.lp_letter; letter++ ) {
- sprintf( name, "df%c%03d%s", letter, lp.lp_seq, hostname );
+ snprintf( name, sizeof(name), "df%c%03d%s", letter, lp.lp_seq, hostname
);
if ( unlink( name ) < 0 ) {
- LOG(log_error, logtype_papd, "lp_cancel unlink %s: %m", name );
+ LOG(log_error, logtype_papd, "lp_cancel unlink %s: %s", name,
strerror(errno) );
}
-@@ -753,7 +753,7 @@ int lp_print()
+@@ -785,7 +785,7 @@ int lp_print()
if ( printer->p_flags & P_SPOOLED ) {
#ifndef HAVE_CUPS
- sprintf( tfname, "tfA%03d%s", lp.lp_seq, hostname );
+ snprintf( tfname, sizeof(tfname), "tfA%03d%s", lp.lp_seq, hostname );
if (( fd = open( tfname, O_WRONLY|O_EXCL|O_CREAT, 0660 )) < 0 ) {
- LOG(log_error, logtype_papd, "lp_print %s: %m", tfname );
+ LOG(log_error, logtype_papd, "lp_print %s: %s", tfname,
strerror(errno) );
return 0;
-@@ -798,7 +798,7 @@ int lp_print()
+@@ -830,7 +830,7 @@ int lp_print()
}
fclose( cfile );
- sprintf( cfname, "cfA%03d%s", lp.lp_seq, hostname );
+ snprintf( cfname, sizeof(cfname), "cfA%03d%s", lp.lp_seq, hostname );
if ( link( tfname, cfname ) < 0 ) {
- LOG(log_error, logtype_papd, "lp_print can't link %s to %s: %m",
cfname,
- tfname );
-@@ -811,7 +811,7 @@ int lp_print()
+ LOG(log_error, logtype_papd, "lp_print can't link %s to %s: %s",
cfname,
+ tfname, strerror(errno) );
+@@ -843,7 +843,7 @@ int lp_print()
return 0;
}
@@ -63,8 +63,8 @@
+ snprintf( buf, sizeof(buf), "\1%s\n", printer->p_printer );
n = strlen( buf );
if ( write( s, buf, n ) != n ) {
- LOG(log_error, logtype_papd, "lp_print write: %m" );
-@@ -944,7 +944,7 @@ int lp_rmjob( job )
+ LOG(log_error, logtype_papd, "lp_print write: %s" ,
strerror(errno));
+@@ -976,7 +976,7 @@ int lp_rmjob( job )
return( -1 );
}
@@ -72,8 +72,8 @@
+ snprintf( buf, sizeof(buf), "\5%s %s %d\n", printer->p_printer,
lp.lp_person, job );
n = strlen( buf );
if ( write( s, buf, n ) != n ) {
- LOG(log_error, logtype_papd, "lp_rmjob write: %m" );
-@@ -982,7 +982,7 @@ int lp_queue( out )
+ LOG(log_error, logtype_papd, "lp_rmjob write: %s", strerror(errno) );
+@@ -1014,7 +1014,7 @@ int lp_queue( out )
return( -1 );
}
@@ -81,4 +81,4 @@
+ snprintf( buf, sizeof(buf), "\3%s\n", printer->p_printer );
n = strlen( buf );
if ( write( s, buf, n ) != n ) {
- LOG(log_error, logtype_papd, "lp_queue write: %m" );
+ LOG(log_error, logtype_papd, "lp_queue write: %s", strerror(errno) );
Index: patches/patch-etc_papd_main_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_papd_main_c,v
retrieving revision 1.1
diff -N -u -r1.1 patches/patch-etc_papd_main_c
--- patches/patch-etc_papd_main_c 22 Sep 2006 05:56:25 -0000 1.1
+++ patches/patch-etc_papd_main_c 4 Mar 2009 21:06:53 -0000
@@ -1,6 +1,6 @@
$OpenBSD: patch-etc_papd_main_c,v 1.1 2006/09/22 05:56:25 pvalchev Exp $
---- etc/papd/main.c.orig Tue Jun 8 21:25:53 2004
-+++ etc/papd/main.c Sat Dec 31 02:51:53 2005
+--- etc/papd/main.c.orig Fri Nov 14 21:04:52 2008
++++ etc/papd/main.c Sun Feb 8 00:30:38 2009
@@ -196,12 +196,10 @@ int main( ac, av )
if (( p = strchr( hostname, '.' )) != 0 ) {
*p = '\0';
@@ -15,7 +15,7 @@
defprinter.p_type = "LaserWriter";
defprinter.p_zone = "*";
memset(&defprinter.p_addr, 0, sizeof(defprinter.p_addr));
-@@ -583,8 +581,8 @@ int getstatus( pr, buf )
+@@ -590,8 +588,8 @@ int getstatus( pr, buf )
int fd = -1, rc;
if ( pr->p_flags & P_SPOOLED && ( pr->p_spool != NULL )) {
@@ -26,7 +26,7 @@
fd = open( path, O_RDONLY);
}
-@@ -643,29 +641,26 @@ static void getprinters( cf )
+@@ -650,29 +648,26 @@ static void getprinters( cf )
exit( 1 );
}
if ( name != defprinter.p_name ) {
@@ -59,7 +59,7 @@
} else {
pr->p_zone = zone;
}
-@@ -681,11 +676,10 @@ static void getprinters( cf )
+@@ -688,11 +683,10 @@ static void getprinters( cf )
if (( p = pgetstr( "pd", &a )) == NULL ) {
pr->p_ppdfile = defprinter.p_ppdfile;
} else {
@@ -72,7 +72,7 @@
}
/*
-@@ -701,22 +695,20 @@ static void getprinters( cf )
+@@ -708,22 +702,20 @@ static void getprinters( cf )
} else {
pr->p_flags = P_SPOOLED;
}
@@ -97,7 +97,7 @@
pr->p_flags |= P_AUTH;
pr->p_flags |= P_AUTH_CAP;
} else { pr->p_authprintdir = NULL; }
-@@ -727,11 +719,10 @@ static void getprinters( cf )
+@@ -734,11 +726,10 @@ static void getprinters( cf )
}
if ((p = pgetstr("am", &a)) != NULL ) {
@@ -110,7 +110,7 @@
}
if ( pr->p_flags & P_SPOOLED ) {
-@@ -741,12 +732,10 @@ static void getprinters( cf )
+@@ -748,12 +739,10 @@ static void getprinters( cf )
if (( p = pgetstr( "op", &a )) == NULL ) {
pr->p_operator = defprinter.p_operator;
} else {
@@ -124,69 +124,67 @@
}
}
-@@ -821,11 +810,10 @@ int rprintcap( pr )
+@@ -828,11 +817,10 @@ int rprintcap( pr )
if ( pr->p_ppdfile == defprinter.p_ppdfile ) {
if ( (p = (char *) cups_get_printer_ppd ( pr->p_printer )) != NULL ) {
- if (( pr->p_ppdfile = (char *)malloc( strlen( p ) + 1 )) == NULL ) {
-- LOG(log_error, logtype_papd, "malloc: %m" );
-- exit( 1 );
+ if (( pr->p_ppdfile = strdup( p )) == NULL ) {
-+ LOG(log_error, logtype_papd, "malloc: %m" );
-+ exit( 1 );
+ LOG(log_error, logtype_papd, "malloc: %s", strerror(errno) );
+ exit( 1 );
}
- strcpy( pr->p_ppdfile, p );
pr->p_flags |= P_CUPS_PPD;
/*LOG(log_info, logtype_papd, "PPD File for %s set to %s",
pr->p_printer, pr->p_ppdfile );*/
}
-@@ -856,11 +844,10 @@ int rprintcap( pr )
+@@ -863,11 +851,10 @@ int rprintcap( pr )
if (( p = pgetstr( "sd", &a )) == NULL ) {
pr->p_spool = defprinter.p_spool;
} else {
- if (( pr->p_spool = (char *)malloc( strlen( p ) + 1 )) == NULL ) {
+ if (( pr->p_spool = strdup( p )) == NULL ) {
- LOG(log_error, logtype_papd, "malloc: %m" );
+ LOG(log_error, logtype_papd, "malloc: %s", strerror(errno) );
exit( 1 );
}
- strcpy( pr->p_spool, p );
}
/*
-@@ -879,12 +866,10 @@ int rprintcap( pr )
+@@ -886,12 +873,10 @@ int rprintcap( pr )
if (( p = pgetstr( "ro", &a )) == NULL ) {
pr->p_role = defprinter.p_role;
} else {
- if (( pr->p_role =
- (char *)malloc( strlen( p ) + 1 )) == NULL ) {
+ if (( pr->p_role = strdup( p )) == NULL ) {
- LOG(log_error, logtype_papd, "malloc: %m" );
+ LOG(log_error, logtype_papd, "malloc: %s", strerror(errno)
);
exit( 1 );
}
- strcpy( pr->p_role, p );
}
if (( c = pgetnum( "si" )) < 0 ) {
-@@ -905,12 +890,10 @@ int rprintcap( pr )
+@@ -912,12 +897,10 @@ int rprintcap( pr )
}
a = area;
if (( p = pgetstr( "pc", &a )) != NULL ) {
- if (( pr->p_pagecost_msg =
- (char *)malloc( strlen( p ) + 1 )) == NULL ) {
+ if (( pr->p_pagecost_msg = strdup( p )) == NULL ) {
- LOG(log_error, logtype_papd, "malloc: %m" );
+ LOG(log_error, logtype_papd, "malloc: %s", strerror(errno) );
exit( 1 );
}
- strcpy( pr->p_pagecost_msg, p );
pr->p_pagecost = 0;
} else if ( pr->p_flags & P_ACCOUNT ) {
if (( c = pgetnum( "pc" )) < 0 ) {
-@@ -931,11 +914,10 @@ int rprintcap( pr )
+@@ -938,11 +921,10 @@ int rprintcap( pr )
if (( p = pgetstr( "lo", &a )) == NULL ) {
pr->p_lock = defprinter.p_lock;
} else {
- if (( pr->p_lock = (char *)malloc( strlen( p ) + 1 )) == NULL ) {
+ if (( pr->p_lock = strdup( p )) == NULL ) {
- LOG(log_error, logtype_papd, "malloc: %m" );
+ LOG(log_error, logtype_papd, "malloc: %s", strerror(errno) );
exit( 1 );
}
- strcpy( pr->p_lock, p );
Index: patches/patch-etc_papd_ppd_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_papd_ppd_c,v
retrieving revision 1.1
diff -N -u -r1.1 patches/patch-etc_papd_ppd_c
--- patches/patch-etc_papd_ppd_c 22 Sep 2006 05:56:25 -0000 1.1
+++ patches/patch-etc_papd_ppd_c 4 Mar 2009 21:06:53 -0000
@@ -1,31 +1,31 @@
$OpenBSD: patch-etc_papd_ppd_c,v 1.1 2006/09/22 05:56:25 pvalchev Exp $
---- etc/papd/ppd.c.orig Sun Feb 6 05:16:02 2005
-+++ etc/papd/ppd.c Sat Dec 31 13:36:19 2005
-@@ -219,12 +219,10 @@ int read_ppd( file, fcnt )
- LOG(log_error, logtype_papd, "malloc: %m" );
+--- etc/papd/ppd.c.orig Fri Nov 14 21:04:52 2008
++++ etc/papd/ppd.c Sun Feb 8 00:34:41 2009
+@@ -220,12 +220,10 @@ int read_ppd( file, fcnt )
+ LOG(log_error, logtype_papd, "malloc: %s", strerror(errno) );
exit( 1 );
}
- if (( pfo->pd_font =
- (char *)malloc( strlen( pe->pe_option ) + 1 )) == NULL ) {
+ if (( pfo->pd_font = strdup( pe->pe_option )) == NULL ) {
- LOG(log_error, logtype_papd, "malloc: %m" );
+ LOG(log_error, logtype_papd, "malloc: %s", strerror(errno) );
exit( 1 );
}
- strcpy( pfo->pd_font, pe->pe_option );
pfo->pd_next = ppd_fonts;
ppd_fonts = pfo;
continue;
-@@ -238,13 +236,10 @@ int read_ppd( file, fcnt )
+@@ -239,13 +237,11 @@ int read_ppd( file, fcnt )
}
}
if ( pfe->pd_name ) { /*&& (pfe->pd_value == NULL) ) { */
- if (( pfe->pd_value =
- (char *)malloc( strlen( pe->pe_value ) + 1 )) == NULL ) {
+ if (( pfe->pd_value = strdup( pe->pe_value )) == NULL ) {
- LOG(log_error, logtype_papd, "malloc: %m" );
+ LOG(log_error, logtype_papd, "malloc: %s", strerror(errno) );
exit( 1 );
}
--
+
- strcpy( pfe->pd_value, pe->pe_value );
continue;
}
Index: patches/patch-libatalk_adouble_ad_open_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-libatalk_adouble_ad_open_c,v
retrieving revision 1.1
diff -N -u -r1.1 patches/patch-libatalk_adouble_ad_open_c
--- patches/patch-libatalk_adouble_ad_open_c 22 Sep 2006 05:56:25 -0000
1.1
+++ patches/patch-libatalk_adouble_ad_open_c 4 Mar 2009 21:06:53 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-libatalk_adouble_ad_open_c,v 1.1 2006/09/22 05:56:25 pvalchev
Exp $
---- libatalk/adouble/ad_open.c.orig Sat Feb 12 06:22:05 2005
-+++ libatalk/adouble/ad_open.c Fri Dec 30 21:36:40 2005
-@@ -677,31 +677,30 @@ ad_path( path, adflags )
+--- libatalk/adouble/ad_open.c.orig Wed Nov 26 02:16:33 2008
++++ libatalk/adouble/ad_open.c Sat Feb 7 23:53:28 2009
+@@ -678,31 +678,30 @@ ad_path( path, adflags )
const char *path;
int adflags;
{
@@ -42,9 +42,9 @@
return( pathbuf );
}
-@@ -715,27 +714,27 @@ ad_path_osx( path, adflags )
- const char *path;
- int adflags;
+@@ -714,27 +713,27 @@ ad_path( path, adflags )
+ char *
+ ad_path_osx( const char *path, int adflags _U_)
{
- static char pathbuf[ MAXPATHLEN + 1];
- char c, *slash, buf[MAXPATHLEN + 1];
@@ -76,7 +76,7 @@
return pathbuf;
}
-@@ -751,11 +750,11 @@ char
+@@ -750,11 +749,11 @@ char
*ad_dir(path)
const char *path;
{
@@ -90,7 +90,7 @@
errno = ENAMETOOLONG;
return NULL; /* can't do it */
}
-@@ -765,7 +764,7 @@ char
+@@ -764,7 +763,7 @@ char
* (path or subdirectory name) to get the name we want to stat.
* For a path which is just a filename, use "." instead.
*/
Index: patches/patch-libatalk_cnid_dbd_cnid_dbd_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-libatalk_cnid_dbd_cnid_dbd_c,v
retrieving revision 1.2
diff -N -u -r1.2 patches/patch-libatalk_cnid_dbd_cnid_dbd_c
--- patches/patch-libatalk_cnid_dbd_cnid_dbd_c 25 Oct 2007 18:57:32 -0000
1.2
+++ patches/patch-libatalk_cnid_dbd_cnid_dbd_c 4 Mar 2009 21:06:53 -0000
@@ -1,6 +1,6 @@
$OpenBSD: patch-libatalk_cnid_dbd_cnid_dbd_c,v 1.2 2007/10/25 18:57:32 steven
Exp $
---- libatalk/cnid/dbd/cnid_dbd.c.orig Sun Feb 6 11:16:03 2005
-+++ libatalk/cnid/dbd/cnid_dbd.c Thu Oct 25 20:30:06 2007
+--- libatalk/cnid/dbd/cnid_dbd.c.orig Wed Jun 6 20:13:17 2007
++++ libatalk/cnid/dbd/cnid_dbd.c Sat Feb 7 23:53:28 2009
@@ -52,7 +52,7 @@ static void RQST_RESET(struct cnid_dbd_rqst *r)
}
@@ -10,7 +10,7 @@
extern int Cnid_port;
static int tsock_getfd(char *host, int port)
-@@ -398,7 +398,7 @@ struct _cnid_db *cnid_dbd_open(const char *dir, mode_t
+@@ -403,7 +403,7 @@ struct _cnid_db *cnid_dbd_open(const char *dir, mode_t
/* We keep a copy of the directory in the db structure so that we can
transparently reconnect later. */
Index: patches/patch-bin_cnid_cnid_index_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-bin_cnid_cnid_index_c,v
retrieving revision 1.1
diff -N -u -r1.1 patches/patch-bin_cnid_cnid_index_c
--- patches/patch-bin_cnid_cnid_index_c 26 Oct 2007 14:27:23 -0000 1.1
+++ /dev/null 28 Sep 2008 10:50:08 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-bin_cnid_cnid_index_c,v 1.1 2007/10/26 14:27:23 steven Exp $
---- bin/cnid/cnid_index.c.orig Sun Apr 10 14:49:18 2005
-+++ bin/cnid/cnid_index.c Thu Oct 25 20:45:50 2007
-@@ -274,7 +274,11 @@ static int dbif_count(const int dbi, u_int32_t *count)
- DB_BTREE_STAT *sp;
- DB *db = db_table[dbi].db;
-
-+#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 2
-+ ret = db->stat(db, NULL, &sp, 0);
-+#else
- ret = db->stat(db, &sp, 0);
-+#endif
-
- if (ret) {
- LOG(log_error, logtype_cnid, "error getting stat infotmation on
database: %s", db_strerror(errno));
Index: patches/patch-etc_cnid_dbd_dbif_c
===================================================================
RCS file: /cvs/ports/net/netatalk/patches/patch-etc_cnid_dbd_dbif_c,v
retrieving revision 1.1
diff -N -u -r1.1 patches/patch-etc_cnid_dbd_dbif_c
--- patches/patch-etc_cnid_dbd_dbif_c 26 Oct 2007 14:27:23 -0000 1.1
+++ /dev/null 28 Sep 2008 10:50:08 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-etc_cnid_dbd_dbif_c,v 1.1 2007/10/26 14:27:23 steven Exp $
---- etc/cnid_dbd/dbif.c.orig Thu Oct 25 20:44:42 2007
-+++ etc/cnid_dbd/dbif.c Thu Oct 25 20:45:23 2007
-@@ -514,7 +514,11 @@ int dbif_count(const int dbi, u_int32_t *count)
- DB_BTREE_STAT *sp;
- DB *db = db_table[dbi].db;
-
-+#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 2
-+ ret = db->stat(db, NULL, &sp, 0);
-+#else
- ret = db->stat(db, &sp, 0);
-+#endif
-
- if (ret) {
- LOG(log_error, logtype_cnid, "error getting stat infotmation on
database: %s", db_strerror(errno));
cvs server: Diffing inside pkg
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/netatalk/pkg/PLIST,v
retrieving revision 1.6
diff -N -u -r1.6 pkg/PLIST
--- pkg/PLIST 17 Nov 2006 22:05:02 -0000 1.6
+++ pkg/PLIST 4 Mar 2009 21:06:53 -0000
@@ -1,9 +1,9 @@
@comment $OpenBSD: PLIST,v 1.6 2006/11/17 22:05:02 aanriot Exp $
-bin/achfile
+...@bin bin/achfile
bin/acleandir.rc
-bin/adv1tov2
-bin/aecho
-bin/afile
+...@bin bin/adv1tov2
+...@bin bin/aecho
+...@bin bin/afile
bin/afpd-mtab.pl
@mode 4755
bin/afppasswd
@@ -15,29 +15,29 @@
bin/binheader
bin/cleanappledouble.pl
bin/cnid2_create
-bin/cnid_index
+...@bin bin/cnid_index
bin/cnid_maint
-bin/getzones
+...@bin bin/getzones
bin/hqx2bin
bin/lp2pap.sh
bin/macbinary
bin/macusers
-bin/megatron
+...@bin bin/megatron
bin/nadheader
-bin/nbplkup
-bin/nbprgstr
-bin/nbpunrgstr
+...@bin bin/nbplkup
+...@bin bin/nbprgstr
+...@bin bin/nbpunrgstr
bin/netatalk-config
bin/nu
-bin/pap
-bin/papstatus
-bin/psorder
-bin/showppd
+...@bin bin/pap
+...@bin bin/papstatus
+...@bin bin/psorder
+...@bin bin/showppd
bin/single2bin
-bin/timeout
+...@bin bin/timeout
bin/unbin
bin/unhex
-bin/uniconv
+...@bin bin/uniconv
bin/unsingle
include/atalk/
include/atalk/adouble.h
@@ -58,10 +58,12 @@
include/atalk/paths.h
include/atalk/rtmp.h
include/atalk/server_child.h
+include/atalk/server_ipc.h
include/atalk/tdb.h
include/atalk/uam.h
include/atalk/unicode.h
include/atalk/util.h
+include/atalk/volinfo.h
include/atalk/zip.h
include/netatalk/
include/netatalk/aarp.h
@@ -102,8 +104,8 @@
libexec/ofpap
libexec/ofwmpap
libexec/ofwpap
-libexec/psa
-libexec/psf
+...@bin libexec/psa
+...@bin libexec/psf
libexec/tfmpap
libexec/tfmpaprev
libexec/tfpap
@@ -156,22 +158,18 @@
@man man/man8/papstatus.8
@man man/man8/psf.8
@man man/man8/timelord.8
-sbin/afpd
-sbin/atalkd
-sbin/cnid_dbd
-sbin/cnid_metad
-sbin/papd
+...@bin sbin/afpd
+...@bin sbin/atalkd
+...@bin sbin/cnid_dbd
+...@bin sbin/cnid_metad
+...@bin sbin/papd
share/aclocal/
share/aclocal/netatalk.m4
share/doc/netatalk/
share/doc/netatalk/COPYING
share/doc/netatalk/COPYRIGHT
share/doc/netatalk/FAQ
-share/doc/netatalk/Netatalk-Manual.pdf
-share/doc/netatalk/Netatalk-Manual.txt
share/doc/netatalk/README.hidden-items
-share/doc/netatalk/README.ids
-share/doc/netatalk/README.logger
share/doc/netatalk/README.platforms
share/examples/netatalk/
@mode 750