Compare commits

...
Sign in to create a new pull request.

67 commits

Author SHA1 Message Date
Fedora Release Engineering
94d03d8b7a Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-16 03:30:22 +00:00
Fedora Release Engineering
74f08aa2b1 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 16:49:06 +00:00
Michal Ambroz
d0216f4017 rebuild with gcc15 + fedora hardening 2025-02-07 12:27:34 +01:00
Michal Ambroz
02badb2422 adding changelog 2025-02-07 12:25:35 +01:00
Fedora Release Engineering
64c7827fc2 Unretirement Releng Request: https://pagure.io/releng/issue/12566
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2025-02-07 07:42:47 +00:00
Miro Hrončok
efa469c13d Retired: https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org/thread/DRIWVJ7BVL3KVVX5TLC36LJPDMAO72HF/ 2025-01-28 10:53:08 +01:00
Fedora Release Engineering
81f984a1ee Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 10:41:45 +00:00
Fedora Release Engineering
a55af4e920 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 16:42:07 +00:00
Miroslav Suchý
a4c01eaa01 convert GPL+ license to SPDX
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2024-06-17 12:23:14 +02:00
Fedora Release Engineering
f1bfbb43a0 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 22:45:52 +00:00
Fedora Release Engineering
fbb2d5ebae Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 12:22:30 +00:00
Fedora Release Engineering
ccdbd66e4a Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 12:59:48 +00:00
Fedora Release Engineering
360d6f9e18 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-18 21:28:47 +00:00
Florian Weimer
c7c078c518 Port to C99
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2022-12-21 14:26:40 +01:00
Michal Ambroz
4396979d22 delete explicitly the libtool .la file 2022-10-25 11:30:36 +02:00
Michal Ambroz
2014cb6054 cosmetics 2022-10-24 14:29:32 +02:00
Fedora Release Engineering
d05d8abe32 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 20:31:21 +00:00
Fedora Release Engineering
2acdcb9067 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-19 21:00:19 +00:00
Michal Ambroz
386755bce6 update the embedded libtool 2021-11-18 08:50:37 +00:00
Michal Ambroz
8c43961472 adding comment 2021-11-15 12:07:30 +00:00
Michal Ambroz
f3d7f81000 aarch64 - allow standard paths in rpath check 2021-11-15 11:37:21 +00:00
Fedora Release Engineering
1631f83835 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 17:20:04 +00:00
Fedora Release Engineering
ea8fffd298 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 12:24:45 +00:00
Michal Ambroz
fc26fc3456 modernize spec, push the bugfix to supported branches 2021-04-26 23:49:39 +02:00
Michal Ambroz
e11a7718b1 fix #1507944 long options 2021-03-12 03:43:11 +00:00
Fedora Release Engineering
5c51830796 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-25 23:52:40 +00:00
Tom Stellard
34cacabac0 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-15 01:57:04 +00:00
Fedora Release Engineering
dac9ff8818 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-31 23:50:30 +00:00
Fedora Release Engineering
8150ad9fe5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 11:49:00 +00:00
rpmbuild
28458b0c66 fix FTBFS for legacy code use -fcommon 2020-04-22 21:27:20 +00:00
Fedora Release Engineering
26bd5687ce - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 11:17:51 +00:00
Fedora Release Engineering
2d9b7ada9c - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-24 17:38:23 +00:00
Igor Gnatenko
35ae3106f0 Rebuild for readline 8.0 2019-02-17 09:30:49 +01:00
Fedora Release Engineering
d62b67dcf5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 13:03:39 +00:00
Igor Gnatenko
67d210aed1 Remove obsolete Group tag
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-01-28 20:17:38 +01:00
Igor Gnatenko
7774667c77
Remove obsolete ldconfig scriptlets
References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-01-22 18:38:29 +01:00
Fedora Release Engineering
b018a90727 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-12 20:02:55 +00:00
Igor Gnatenko
6ed6a3fd27 add BuildRequires: gcc
Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
2018-07-09 19:06:42 +02:00
Fedora Release Engineering
da61f36f0d - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 01:58:14 +00:00
Fedora Release Engineering
0d0df99283 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 17:25:53 +00:00
Fedora Release Engineering
3e6cea7d0d - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 02:39:18 +00:00
Fedora Release Engineering
d684d7eb76 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 05:48:02 +00:00
Dennis Gilmore
57356d21b1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-03 16:01:40 +00:00
Dennis Gilmore
be0dd65f7c - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-16 23:40:39 +00:00
Haïkel Guémar
4416edf512 Fix mount_afp crash (RHBZ #1165296) 2014-11-25 23:42:46 +01:00
Peter Robinson
6a2c07529c - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-15 20:06:12 +00:00
Dennis Gilmore
36bd03e308 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-06 19:15:04 -05:00
Tomas Mraz
b824cbacb1 Rebuild for new libgcrypt 2014-04-22 20:33:39 +02:00
Lubomir Rintel
766f481683 Fix build with -Werror=format-security 2013-12-04 23:43:20 +01:00
Lubomir Rintel
106289b4b1 Attempt at saner SPEC file formatting
I'm doing this semi-automatically across all packages I maintain, since some
are several years old and since then several have suffered bit-rot and such.
I'm fixing up the following:

- Old RPM relics (such as %defattr, BuildRoot or %clean sections)
- Whitespace errors (such as trailing spaces)
- Consistent use of %{buildroot}
- Dropping useless %{name} expansions that harm legibility
- Consistent spacing between RPM sections
- Bad days in %changelogs
2013-10-24 11:39:53 +02:00
Dennis Gilmore
134eb3d013 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-02 19:23:11 -05:00
Dennis Gilmore
8c9df659e2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-13 10:21:38 -06:00
Dennis Gilmore
25cb831501 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-18 10:39:53 -05:00
Dennis Gilmore
ce90444776 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-12 15:04:12 -06:00
Marcela Mašláňová
3598866764 * Thu Oct 20 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.8.1-8.3
- rebuild with new gmp without compat lib
2011-10-20 14:29:26 +02:00
Marcela Mašláňová
82600ad9a9 rebuild with new gmp 2011-10-10 11:27:13 +02:00
Marcela Mašláňová
2456994584 rebuild with new gmp 2011-09-26 14:52:52 +02:00
Jan F. Chadima
89cd34c1e1 Repair ponter arithmetic 2011-07-04 08:11:23 +02:00
Jan F. Chadima
dae616bd94 Repair ponter arithmetic 2011-07-04 08:10:55 +02:00
Dennis Gilmore
1ac35f0591 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-07 18:33:42 -06:00
Fedora Release Engineering
2bf066fa1a dist-git conversion 2010-07-28 09:37:29 +00:00
Bill Nottingham
5287dae767 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 22:38:38 +00:00
Peter Lemenkov
90e65a6616 rebuilt with new fuse 2009-09-17 06:01:11 +00:00
Jesse Keating
d988137ec1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-24 16:37:37 +00:00
Lubomir Rintel
415a2edd01 - Don't refer to AppleTalk in Summary 2009-07-17 16:27:43 +00:00
Lubomir Rintel
64607b8691 - Fix up license tag 2009-07-14 16:36:52 +00:00
Lubomir Rintel
1a9d372aa5 Initial import of afpfs-ng 2009-03-24 17:49:10 +00:00
13 changed files with 1044 additions and 21 deletions

View file

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
afpfs-ng-0.8.1.tar.bz2

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: afpfs-ng
# $Id$
NAME := afpfs-ng
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

164
afpfs-ng-0.8.1-c99.patch Normal file
View file

@ -0,0 +1,164 @@
Add additional #include directives for more function prototypes,
to avoid implicit function declarations. Declare appledouble_write,
cmdline_afp_setup_client in the appropriate header files.
These changes expose an argument type mismatch in the function
appledouble_truncate, in the calls to remove_opened_fork. This may
or may have not worked before, depending on how the ABI implements
passing this struct by value.
The use of basename in start_afpfsd is suspect; this should probaby use
dirname instead.
Submitted upstream: <https://sourceforge.net/p/afpfs-ng/patches/5/>
diff --git a/cmdline/cmdline_afp.h b/cmdline/cmdline_afp.h
index ebdf357fc952972c..e0ec4570f69b71ec 100644
--- a/cmdline/cmdline_afp.h
+++ b/cmdline/cmdline_afp.h
@@ -28,5 +28,6 @@ int com_disconnect(char * arg);
void cmdline_afp_exit(void);
int cmdline_afp_setup(int recursive, char * url_string);
+void cmdline_afp_setup_client(void);
#endif
diff --git a/cmdline/cmdline_main.c b/cmdline/cmdline_main.c
index ffb39ebacb8f262c..deccf8a4cc342bf0 100644
--- a/cmdline/cmdline_main.c
+++ b/cmdline/cmdline_main.c
@@ -17,6 +17,7 @@
#include <getopt.h>
#include <ctype.h>
#include <signal.h>
+#include "afp.h"
#include "cmdline_afp.h"
#include "cmdline_testafp.h"
diff --git a/fuse/client.c b/fuse/client.c
index d19e9efb2dcb60b7..beceaa5594a89b80 100644
--- a/fuse/client.c
+++ b/fuse/client.c
@@ -10,6 +10,7 @@
#include <unistd.h>
#include <errno.h>
#include <grp.h>
+#include <libgen.h>
#include "config.h"
#include <afp.h>
diff --git a/fuse/daemon.c b/fuse/daemon.c
index 8b3b8d9146633518..abf6c02e390142b2 100644
--- a/fuse/daemon.c
+++ b/fuse/daemon.c
@@ -23,6 +23,8 @@
#include <signal.h>
#include <sys/socket.h>
+#include <fuse.h>
+
#include "afp.h"
#include "dsi.h"
diff --git a/lib/dsi.c b/lib/dsi.c
index 8a469794542ec447..3fd10fb24c770ca8 100644
--- a/lib/dsi.c
+++ b/lib/dsi.c
@@ -27,6 +27,7 @@
#include "libafpclient.h"
#include "afp_internal.h"
#include "afp_replies.h"
+#include "codepage.h"
/* define this in order to get reams of DSI debugging information */
#undef DEBUG_DSI
diff --git a/lib/lowlevel.c b/lib/lowlevel.c
index f3b632c2ae2da763..1edc9cdce5cc8429 100644
--- a/lib/lowlevel.c
+++ b/lib/lowlevel.c
@@ -25,6 +25,8 @@
#include "utils.h"
#include "did.h"
#include "users.h"
+#include "midlevel.h"
+#include "forklist.h"
static void set_nonunix_perms(unsigned int * mode, struct afp_file_info *fp)
{
diff --git a/lib/proto_files.c b/lib/proto_files.c
index 933956da6a6d2ce6..d2acd562a2671869 100644
--- a/lib/proto_files.c
+++ b/lib/proto_files.c
@@ -14,6 +14,7 @@
#include "dsi_protocol.h"
#include "afp_protocol.h"
#include "afp_internal.h"
+#include "afp_replies.h"
/* afp_setfileparms, afp_setdirparms and afpsetfiledirparms are all remarkably
similiar. We abstract them to afp-setparms_lowlevel. */
diff --git a/lib/proto_replyblock.c b/lib/proto_replyblock.c
index f66791614a52ca3d..c59629b24ab83cec 100644
--- a/lib/proto_replyblock.c
+++ b/lib/proto_replyblock.c
@@ -10,6 +10,7 @@
#include "afp.h"
#include "utils.h"
#include "afp_internal.h"
+#include "afp_replies.h"
/* FIXME: should do bounds checking */
diff --git a/lib/resource.c b/lib/resource.c
index 6be4a5b1de51fec5..fb39889f0d7702c0 100644
--- a/lib/resource.c
+++ b/lib/resource.c
@@ -8,6 +8,7 @@
#include "lowlevel.h"
#include "did.h"
#include "midlevel.h"
+#include "forklist.h"
#define appledouble ".AppleDouble"
#define finderinfo_string ".finderinfo"
@@ -362,12 +363,12 @@ int appledouble_truncate(struct afp_volume * volume, const char * path, int offs
ret=ll_zero_file(volume,fp.forkid,0);
if (ret<0) {
afp_closefork(volume,fp.forkid);
- remove_opened_fork(volume,fp);
+ remove_opened_fork(volume,&fp);
free(newpath);
return ret;
}
afp_closefork(volume,fp.forkid);
- remove_opened_fork(volume,fp);
+ remove_opened_fork(volume,&fp);
return 1;
case AFP_META_APPLEDOUBLE:
diff --git a/lib/resource.h b/lib/resource.h
index 6a0d38a6275dd6f5..2efff106c94e6637 100644
--- a/lib/resource.h
+++ b/lib/resource.h
@@ -31,6 +31,9 @@ int appledouble_read(struct afp_volume * volume, struct afp_file_info *fp,
int appledouble_close(struct afp_volume * volume, struct afp_file_info * fp);
+int appledouble_write(struct afp_volume * volume, struct afp_file_info *fp,
+ const char *data, size_t size, off_t offset, size_t *totalwritten);
+
int appledouble_chmod(struct afp_volume * volume, const char * path, mode_t mode);
int appledouble_unlink(struct afp_volume * volume, const char *path);
diff --git a/lib/server.c b/lib/server.c
index 977c418efccae88b..93400dd92a4c0af6 100644
--- a/lib/server.c
+++ b/lib/server.c
@@ -7,6 +7,7 @@
#include <string.h>
#include <time.h>
+#include <sys/time.h>
#include "afp.h"
#include "dsi.h"

View file

@ -0,0 +1,159 @@
From 2c76660566d026d430305231e72c259372de4380 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Wed, 4 Dec 2013 23:17:10 +0100
Subject: [PATCH] Fix build with -Werror=format-security
Fedora, starting with version 21, will enable this flag in order to limit
potentially insecure uses of format strings. It is required for format strings
to be constant now.
---
cmdline/cmdline_afp.c | 4 ++--
cmdline/cmdline_testafp.c | 12 ++++++------
fuse/client.c | 5 +----
fuse/commands.c | 4 ++--
lib/afp_url.c | 12 ++++++------
5 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/cmdline/cmdline_afp.c b/cmdline/cmdline_afp.c
index 827150b..59f0977 100644
--- a/cmdline/cmdline_afp.c
+++ b/cmdline/cmdline_afp.c
@@ -828,11 +828,11 @@ int com_status(char * arg)
char text[40960];
afp_status_header(text,&len);
- printf(text);
+ printf("%s", text);
len=40960;
afp_status_server(server,text,&len);
- printf(text);
+ printf("%s", text);
return 0;
}
diff --git a/cmdline/cmdline_testafp.c b/cmdline/cmdline_testafp.c
index c40f2bd..f887aec 100644
--- a/cmdline/cmdline_testafp.c
+++ b/cmdline/cmdline_testafp.c
@@ -26,12 +26,12 @@ static int test_one_url(char * url_string,
struct afp_url valid_url;
afp_default_url(&valid_url);
valid_url.protocol=protocol;
- sprintf(valid_url.servername,servername);
- sprintf(valid_url.volumename,volumename);
- sprintf(valid_url.path,path);
- sprintf(valid_url.username,username);
- sprintf(valid_url.password,password);
- sprintf(valid_url.uamname,uamname);
+ snprintf(valid_url.servername,sizeof(valid_url.servername),"%s",servername);
+ snprintf(valid_url.volumename,sizeof(valid_url.volumename),"%s",volumename);
+ snprintf(valid_url.path,sizeof(valid_url.path),"%s",path);
+ snprintf(valid_url.username,sizeof(valid_url.username),"%s",username);
+ snprintf(valid_url.password,sizeof(valid_url.password),"%s",password);
+ snprintf(valid_url.uamname,(valid_url.uamname),"%s",uamname);
valid_url.port=port;
if (afp_url_validate(url_string,&valid_url))
diff --git a/fuse/client.c b/fuse/client.c
index f795ca6..d19e9ef 100644
--- a/fuse/client.c
+++ b/fuse/client.c
@@ -509,7 +509,6 @@ static int prepare_buffer(int argc, char * argv[])
int read_answer(int sock) {
int len=0, expected_len=0, packetlen;
char incoming_buffer[MAX_CLIENT_RESPONSE];
- char toprint[MAX_CLIENT_RESPONSE+200];
struct timeval tv;
fd_set rds,ords;
int ret;
@@ -546,9 +545,7 @@ int read_answer(int sock) {
}
done:
- memset(toprint,0,MAX_CLIENT_RESPONSE+200);
- snprintf(toprint,MAX_CLIENT_RESPONSE+200,"%s",incoming_buffer+sizeof(*answer));
- printf(toprint);
+ printf("%.200s",incoming_buffer+sizeof(*answer));
return ((struct afp_server_response *) incoming_buffer)->result;
return 0;
diff --git a/fuse/commands.c b/fuse/commands.c
index aa7444d..bb06928 100644
--- a/fuse/commands.c
+++ b/fuse/commands.c
@@ -163,6 +163,7 @@ static void fuse_log_for_client(void * priv,
len = strlen(c->client_string);
snprintf(c->client_string+len,
MAX_CLIENT_RESPONSE-len,
+ "%s",
message);
} else {
@@ -468,7 +468,7 @@ static int process_mount(struct fuse_client * c)
volume->mapping=req->map;
afp_detect_mapping(volume);
- snprintf(volume->mountpoint,255,req->mountpoint);
+ snprintf(volume->mountpoint,255,"%s",req->mountpoint);
/* Create the new thread and block until we get an answer back */
{
diff --git a/lib/afp_url.c b/lib/afp_url.c
index 42bac1c..f152d7b 100644
--- a/lib/afp_url.c
+++ b/lib/afp_url.c
@@ -233,7 +233,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose)
}
}
- snprintf(url->servername,strlen(p)+1,p);
+ snprintf(url->servername,strlen(p)+1,"%s",p);
if (check_servername(url->servername)) {
if (verbose) printf("This isn't a valid servername\n");
return -1;
@@ -263,7 +263,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose)
if ((q=escape_strrchr(p,':',":"))) {
*q='\0';
q++;
- snprintf(url->password,strlen(q)+1,q);
+ snprintf(url->password,strlen(q)+1,"%s",q);
if (check_password(url->password)) {
if (verbose) printf("This isn't a valid passwd\n");
return -1;
@@ -276,7 +276,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose)
if ((q=strstr(p,";AUTH="))) {
*q='\0';
q+=6;
- snprintf(url->uamname,strlen(q)+1,q);
+ snprintf(url->uamname,strlen(q)+1,"%s",q);
if (check_uamname(url->uamname)) {
if (verbose) printf("This isn't a valid uamname\n");
return -1;
@@ -284,7 +284,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose)
}
if (strlen(p)>0) {
- snprintf(url->username,strlen(p)+1,p);
+ snprintf(url->username,strlen(p)+1,"%s",p);
if (check_username(url->username)) {
if (verbose) printf("This isn't a valid username\n");
return -1;;
@@ -304,12 +304,12 @@ parse_secondpart:
*q='\0';
q++;
}
- snprintf(url->volumename,strlen(p)+1,p);
+ snprintf(url->volumename,strlen(p)+1,"%s",p);
if (q) {
url->path[0]='/';
- snprintf(url->path+1,strlen(q)+1,q);
+ snprintf(url->path+1,strlen(q)+1,"%s",q);
}
done:
--
1.8.4.2

View file

@ -0,0 +1,11 @@
diff -ru afpfs-ng-0.8.1.orig/cmdline/cmdline_main.c afpfs-ng-0.8.1.new/cmdline/cmdline_main.c
--- afpfs-ng-0.8.1.orig/cmdline/cmdline_main.c 2008-02-19 01:54:53.000000000 +0000
+++ afpfs-ng-0.8.1.new/cmdline/cmdline_main.c 2021-03-12 03:28:59.315715841 +0000
@@ -387,6 +387,7 @@
struct option long_options[] = {
{"recursive",1,0,'r'},
+ {NULL,0,NULL,0}
};
char * url = argv[1];

View file

@ -0,0 +1,28 @@
Fix possible buffer overflows (given we're copying to storage of AFP_MAX_PATH,
while AFP_MAX_PATH is much smaller than PATH_MAX)
Lubomir Rintel <lkundrak@v3.sk>
--- afpfs-ng-0.8.1/cmdline/cmdline_afp.c.overflows 2008-10-06 19:21:32.000000000 +0200
+++ afpfs-ng-0.8.1/cmdline/cmdline_afp.c 2008-10-06 19:13:50.000000000 +0200
@@ -129,9 +129,9 @@
{
if (filename[0]!='/') {
if (strlen(curdir)==1)
- snprintf(server_fullname,PATH_MAX,"/%s",filename);
+ snprintf(server_fullname,AFP_MAX_PATH,"/%s",filename);
else
- snprintf(server_fullname,PATH_MAX,"%s/%s",curdir,filename);
+ snprintf(server_fullname,AFP_MAX_PATH,"%s/%s",curdir,filename);
} else {
snprintf(server_fullname,PATH_MAX,"%s",filename);
}
@@ -1217,7 +1217,7 @@
{
struct passwd * passwd;
- snprintf(curdir,PATH_MAX,"%s",DEFAULT_DIRECTORY);
+ snprintf(curdir,AFP_MAX_PATH,"%s",DEFAULT_DIRECTORY);
if (init_uams()<0) return -1;
afp_default_url(&url);

View file

@ -0,0 +1,280 @@
diff -up afpfs-ng-0.8.1/cmdline/getstatus.c.pointer afpfs-ng-0.8.1/cmdline/getstatus.c
--- afpfs-ng-0.8.1/cmdline/getstatus.c.pointer 2011-06-14 17:06:35.000000000 +0200
+++ afpfs-ng-0.8.1/cmdline/getstatus.c 2011-06-14 17:07:25.000000000 +0200
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <pthread.h>
diff -up afpfs-ng-0.8.1/fuse/client.c.pointer afpfs-ng-0.8.1/fuse/client.c
--- afpfs-ng-0.8.1/fuse/client.c.pointer 2008-03-08 03:44:16.000000000 +0100
+++ afpfs-ng-0.8.1/fuse/client.c 2011-06-14 17:02:15.000000000 +0200
@@ -61,8 +61,9 @@ static int start_afpfsd(void)
snprintf(filename, PATH_MAX,
"/usr/local/bin/%s",AFPFSD_FILENAME);
if (access(filename,X_OK)) {
- snprintf(filename, "/usr/bin/%s",
+ snprintf(filename, sizeof(filename), "/usr/bin/%s",
AFPFSD_FILENAME);
+ filename[sizeof(filename) - 1] = 0;
if (access(filename,X_OK)) {
printf("Could not find server (%s)\n",
filename);
diff -up afpfs-ng-0.8.1/fuse/fuse_int.c.pointer afpfs-ng-0.8.1/fuse/fuse_int.c
--- afpfs-ng-0.8.1/fuse/fuse_int.c.pointer 2008-03-02 06:06:24.000000000 +0100
+++ afpfs-ng-0.8.1/fuse/fuse_int.c 2011-06-14 17:02:15.000000000 +0200
@@ -197,7 +197,7 @@ static int fuse_open(const char *path, s
ret = ml_open(volume,path,flags,&fp);
if (ret==0)
- fi->fh=(void *) fp;
+ fi->fh=(unsigned long) fp;
return ret;
}
diff -up afpfs-ng-0.8.1/include/afp.h.pointer afpfs-ng-0.8.1/include/afp.h
--- afpfs-ng-0.8.1/include/afp.h.pointer 2008-03-08 17:08:18.000000000 +0100
+++ afpfs-ng-0.8.1/include/afp.h 2011-06-14 17:02:15.000000000 +0200
@@ -370,7 +370,7 @@ int afp_unmount_all_volumes(struct afp_s
int afp_opendt(struct afp_volume *volume, unsigned short * refnum);
-int afp_closedt(struct afp_server * server, unsigned short * refnum);
+int afp_closedt(struct afp_server * server, unsigned short refnum);
int afp_getcomment(struct afp_volume *volume, unsigned int did,
const char * pathname, struct afp_comment * comment);
diff -up afpfs-ng-0.8.1/include/utils.h.pointer afpfs-ng-0.8.1/include/utils.h
--- afpfs-ng-0.8.1/include/utils.h.pointer 2008-02-18 04:33:58.000000000 +0100
+++ afpfs-ng-0.8.1/include/utils.h 2011-06-14 17:02:15.000000000 +0200
@@ -8,8 +8,8 @@
#define hton64(x) (x)
#define ntoh64(x) (x)
#else /* BYTE_ORDER == BIG_ENDIAN */
-#define hton64(x) ((u_int64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \
- (u_int64_t) ((htonl(x) & 0xffffffffLL) << 32))
+#define hton64(x) ((u_int64_t) (htonl((((unsigned long long)(x)) >> 32) & 0xffffffffLL)) | \
+ (u_int64_t) ((htonl((unsigned long long)(x)) & 0xffffffffLL) << 32))
#define ntoh64(x) (hton64(x))
#endif /* BYTE_ORDER == BIG_ENDIAN */
diff -up afpfs-ng-0.8.1/lib/afp_url.c.pointer afpfs-ng-0.8.1/lib/afp_url.c
--- afpfs-ng-0.8.1/lib/afp_url.c.pointer 2008-03-04 21:16:49.000000000 +0100
+++ afpfs-ng-0.8.1/lib/afp_url.c 2011-06-14 17:02:15.000000000 +0200
@@ -33,7 +33,7 @@ static int check_port(char * port)
static int check_uamname(const char * uam)
{
char * p;
- for (p=uam;*p;p++) {
+ for (p=(char *)uam;*p;p++) {
if (*p==' ') continue;
if ((*p<'A') || (*p>'z')) return -1;
}
@@ -188,7 +188,7 @@ int afp_parse_url(struct afp_url * url,
return -1;
}
- if (p==NULL) p=toparse;
+ if (p==NULL) p=(char *)toparse;
/* Now split on the first / */
if (sscanf(p,"%[^/]/%[^$]",
diff -up afpfs-ng-0.8.1/lib/did.c.pointer afpfs-ng-0.8.1/lib/did.c
--- afpfs-ng-0.8.1/lib/did.c.pointer 2008-02-18 04:39:17.000000000 +0100
+++ afpfs-ng-0.8.1/lib/did.c 2011-06-14 17:02:15.000000000 +0200
@@ -226,7 +226,7 @@ int get_dirid(struct afp_volume * volume
/* Go to the end of last known entry */
- p=path+(p-copy);
+ p=(char *)path+(p-copy);
p2=p;
while ((p=strchr(p+1,'/'))) {
diff -up afpfs-ng-0.8.1/lib/dsi.c.pointer afpfs-ng-0.8.1/lib/dsi.c
--- afpfs-ng-0.8.1/lib/dsi.c.pointer 2008-02-18 04:53:03.000000000 +0100
+++ afpfs-ng-0.8.1/lib/dsi.c 2011-06-14 17:02:15.000000000 +0200
@@ -474,7 +474,7 @@ void dsi_getstatus_reply(struct afp_serv
}
server->flags=ntohs(reply1->flags);
- p=(void *)((unsigned int) server->incoming_buffer + sizeof(*reply1));
+ p=(void *)((unsigned long) server->incoming_buffer + sizeof(*reply1));
p+=copy_from_pascal(server->server_name,p,AFP_SERVER_NAME_LEN)+1;
/* Now work our way through the variable bits */
@@ -757,7 +757,7 @@ gotenough:
printf("<<< read() of rest of AFP, %d bytes\n",amount_to_read);
#endif
ret = read(server->fd, (void *)
- (((unsigned int) server->incoming_buffer)+server->data_read),
+ (((unsigned long) server->incoming_buffer)+server->data_read),
amount_to_read);
if (ret<0) return -1;
if (ret==0) {
diff -up afpfs-ng-0.8.1/lib/loop.c.pointer afpfs-ng-0.8.1/lib/loop.c
--- afpfs-ng-0.8.1/lib/loop.c.pointer 2008-02-18 04:40:11.000000000 +0100
+++ afpfs-ng-0.8.1/lib/loop.c 2011-06-14 17:02:15.000000000 +0200
@@ -25,7 +25,7 @@
static unsigned char exit_program=0;
static pthread_t ending_thread;
-static pthread_t main_thread = NULL;
+static pthread_t main_thread = (pthread_t)NULL;
static int loop_started=0;
static pthread_cond_t loop_started_condition;
diff -up afpfs-ng-0.8.1/lib/lowlevel.c.pointer afpfs-ng-0.8.1/lib/lowlevel.c
--- afpfs-ng-0.8.1/lib/lowlevel.c.pointer 2008-02-20 02:33:17.000000000 +0100
+++ afpfs-ng-0.8.1/lib/lowlevel.c 2011-06-14 17:02:15.000000000 +0200
@@ -582,7 +582,7 @@ int ll_getattr(struct afp_volume * volum
if (volume->server->using_version->av_number>=30)
stbuf->st_mode |= fp.unixprivs.permissions;
else
- set_nonunix_perms(stbuf,&fp);
+ set_nonunix_perms(&stbuf->st_mode,&fp);
stbuf->st_uid=fp.unixprivs.uid;
stbuf->st_gid=fp.unixprivs.gid;
diff -up afpfs-ng-0.8.1/lib/midlevel.c.pointer afpfs-ng-0.8.1/lib/midlevel.c
--- afpfs-ng-0.8.1/lib/midlevel.c.pointer 2008-03-08 17:08:18.000000000 +0100
+++ afpfs-ng-0.8.1/lib/midlevel.c 2011-06-14 17:02:15.000000000 +0200
@@ -713,7 +713,7 @@ int ml_write(struct afp_volume * volume,
{
int ret,err=0;
- int totalwritten = 0;
+ size_t totalwritten = 0;
uint64_t sizetowrite, ignored;
unsigned char flags = 0;
unsigned int max_packet_size=volume->server->tx_quantum;
diff -up afpfs-ng-0.8.1/lib/proto_attr.c.pointer afpfs-ng-0.8.1/lib/proto_attr.c
--- afpfs-ng-0.8.1/lib/proto_attr.c.pointer 2008-01-30 05:37:58.000000000 +0100
+++ afpfs-ng-0.8.1/lib/proto_attr.c 2011-06-14 17:02:15.000000000 +0200
@@ -166,7 +166,7 @@ int afp_getextattr(struct afp_volume * v
copy_path(server,p,pathname,strlen(pathname));
unixpath_to_afppath(server,p);
p2=p+sizeof_path_header(server)+strlen(pathname);
- if (((unsigned int ) p2) & 0x1) p2++;
+ if (((unsigned long) p2) & 0x1) p2++;
req2=(void *) p2;
req2->len=htons(namelen);
diff -up afpfs-ng-0.8.1/lib/proto_desktop.c.pointer afpfs-ng-0.8.1/lib/proto_desktop.c
--- afpfs-ng-0.8.1/lib/proto_desktop.c.pointer 2008-02-18 04:44:11.000000000 +0100
+++ afpfs-ng-0.8.1/lib/proto_desktop.c 2011-06-14 17:02:15.000000000 +0200
@@ -168,7 +168,7 @@ int afp_getcomment_reply(struct afp_serv
return 0;
}
-int afp_closedt(struct afp_server * server, unsigned short * refnum)
+int afp_closedt(struct afp_server * server, unsigned short refnum)
{
struct {
struct dsi_header dsi_header __attribute__((__packed__));
diff -up afpfs-ng-0.8.1/lib/proto_directory.c.pointer afpfs-ng-0.8.1/lib/proto_directory.c
--- afpfs-ng-0.8.1/lib/proto_directory.c.pointer 2008-02-19 03:39:29.000000000 +0100
+++ afpfs-ng-0.8.1/lib/proto_directory.c 2011-06-14 17:02:15.000000000 +0200
@@ -248,6 +248,7 @@ int afp_enumerate_reply(struct afp_serve
return 0;
}
+
int afp_enumerateext2_reply(struct afp_server *server, char * buf, unsigned int size, void * other)
{
@@ -266,8 +267,7 @@ int afp_enumerateext2_reply(struct afp_s
char * p = buf + sizeof(*reply);
int i;
char *max=buf+size;
- struct afp_file_info * filebase = NULL, *filecur=NULL, *new_file=NULL;
- void ** x = other;
+ struct afp_file_info * filebase = NULL, *filecur = NULL, *new_file = NULL, **x = (struct afp_file_info **) other;
if (reply->dsi_header.return_code.error_code) {
return reply->dsi_header.return_code.error_code;
diff -up afpfs-ng-0.8.1/lib/proto_map.c.pointer afpfs-ng-0.8.1/lib/proto_map.c
--- afpfs-ng-0.8.1/lib/proto_map.c.pointer 2008-01-30 05:37:59.000000000 +0100
+++ afpfs-ng-0.8.1/lib/proto_map.c 2011-06-14 17:02:15.000000000 +0200
@@ -122,7 +122,7 @@ int afp_mapid_reply(struct afp_server *s
if (reply->header.return_code.error_code!=kFPNoErr) return -1;
- copy_from_pascal_two(name,&reply->name,255);
+ copy_from_pascal_two(name,reply->name,255);
return 0;
}
diff -up afpfs-ng-0.8.1/lib/proto_session.c.pointer afpfs-ng-0.8.1/lib/proto_session.c
--- afpfs-ng-0.8.1/lib/proto_session.c.pointer 2008-02-18 04:46:19.000000000 +0100
+++ afpfs-ng-0.8.1/lib/proto_session.c 2011-06-14 17:02:15.000000000 +0200
@@ -39,7 +39,7 @@ int afp_getsessiontoken(struct afp_serve
switch (type) {
case kLoginWithTimeAndID:
case kReconnWithTimeAndID: {
- uint32_t *p = (void *) (((unsigned int) request)+
+ uint32_t *p = (void *) (((unsigned long) request)+
sizeof(*request));
offset=sizeof(timestamp);
@@ -63,7 +63,7 @@ int afp_getsessiontoken(struct afp_serve
goto error;
}
- data=(void *) (((unsigned int) request)+sizeof(*request)+offset);
+ data=(void *) (((unsigned long) request)+sizeof(*request)+offset);
request->idlength=htonl(datalen);
request->pad=0;
request->type=htons(type);
@@ -127,7 +127,7 @@ int afp_disconnectoldsession(struct afp_
if ((request=malloc(sizeof(*request) + AFP_TOKEN_MAX_LEN))==NULL)
return -1;
- token_data = request + sizeof(*request);
+ token_data = (char *)request + sizeof(*request);
request->type=htons(type);
diff -up afpfs-ng-0.8.1/lib/uams.c.pointer afpfs-ng-0.8.1/lib/uams.c
--- afpfs-ng-0.8.1/lib/uams.c.pointer 2008-01-04 04:52:44.000000000 +0100
+++ afpfs-ng-0.8.1/lib/uams.c 2011-06-14 17:02:15.000000000 +0200
@@ -180,7 +180,7 @@ static int cleartxt_login(struct afp_ser
goto cleartxt_fail;
p += copy_to_pascal(p, username) + 1;
- if ((int)p & 0x1)
+ if ((long)p & 0x1)
len--;
else
p++;
@@ -230,7 +230,7 @@ static int cleartxt_passwd(struct afp_se
goto cleartxt_fail;
p += copy_to_pascal(p, username) + 1;
- if ((int)p & 0x1)
+ if ((long)p & 0x1)
len--;
else
p++;
@@ -580,7 +580,7 @@ static int dhx_login(struct afp_server *
if (ai == NULL)
goto dhx_noctx_fail;
d += copy_to_pascal(ai, username) + 1;
- if (((int)d) % 2)
+ if (((long)d) % 2)
d++;
else
ai_len--;
diff -up afpfs-ng-0.8.1/lib/utils.c.pointer afpfs-ng-0.8.1/lib/utils.c
--- afpfs-ng-0.8.1/lib/utils.c.pointer 2008-02-18 04:53:37.000000000 +0100
+++ afpfs-ng-0.8.1/lib/utils.c 2011-06-14 17:02:15.000000000 +0200
@@ -196,7 +196,7 @@ int invalid_filename(struct afp_server *
maxlen=255;
- p=filename+1;
+ p=(char *)filename+1;
while ((q=strchr(p,'/'))) {
if (q>p+maxlen)
return 1;

View file

@ -0,0 +1,109 @@
diff -ru afpfs-ng-0.8.1.orig/lib/loop.c afpfs-ng-0.8.1.new/lib/loop.c
--- afpfs-ng-0.8.1.orig/lib/loop.c 2025-02-06 15:18:29.028488247 +0100
+++ afpfs-ng-0.8.1.new/lib/loop.c 2025-02-06 15:02:08.261418298 +0100
@@ -87,7 +87,7 @@
static int ending=0;
void * just_end_it_now(void * ignore)
{
- if (ending) return;
+ if (ending) return(NULL);
ending=1;
if (libafpclient->forced_ending_hook)
libafpclient->forced_ending_hook();
diff -ru afpfs-ng-0.8.1.orig/lib/proto_directory.c afpfs-ng-0.8.1.new/lib/proto_directory.c
--- afpfs-ng-0.8.1.orig/lib/proto_directory.c 2025-02-06 15:18:29.030488258 +0100
+++ afpfs-ng-0.8.1.new/lib/proto_directory.c 2025-02-06 15:17:58.862309936 +0100
@@ -16,6 +16,19 @@
#include "dsi_protocol.h"
#include "afp_replies.h"
+typedef struct reply_entry {
+ uint8_t size;
+ uint8_t isdir;
+};
+
+typedef struct ext2_reply_entry {
+ uint16_t size;
+ uint8_t isdir;
+ uint8_t pad;
+};
+
+
+
int afp_moveandrename(struct afp_volume *volume,
unsigned int src_did,
unsigned int dst_did,
@@ -200,10 +213,7 @@
uint16_t reqcount;
} __attribute__((__packed__)) * reply = (void *) buf;
- struct {
- uint8_t size;
- uint8_t isdir;
- } __attribute__((__packed__)) * entry;
+ struct reply_entry __attribute__((__packed__)) * entry;
char * p = buf + sizeof(*reply);
int i;
char *max=buf+size;
@@ -219,7 +229,7 @@
}
for (i=0;i<ntohs(reply->reqcount);i++) {
- entry = (void *) p;
+ entry = ( struct reply_entry *) p;
if (p>max) {
return -1;
@@ -259,11 +269,7 @@
uint16_t reqcount;
} __attribute__((__packed__)) * reply = (void *) buf;
- struct {
- uint16_t size;
- uint8_t isdir;
- uint8_t pad;
- } __attribute__((__packed__)) * entry;
+ struct ext2_reply_entry __attribute__((__packed__)) * entry;
char * p = buf + sizeof(*reply);
int i;
char *max=buf+size;
@@ -293,7 +299,7 @@
filecur=new_file;
}
- entry = p;
+ entry = ( struct ext2_reply_entry *) p;
parse_reply_block(server,p+sizeof(*entry),
ntohs(entry->size),entry->isdir,
diff -ru afpfs-ng-0.8.1.orig/lib/uams.c afpfs-ng-0.8.1.new/lib/uams.c
--- afpfs-ng-0.8.1.orig/lib/uams.c 2025-02-06 15:18:29.030488258 +0100
+++ afpfs-ng-0.8.1.new/lib/uams.c 2025-02-06 15:00:32.383809018 +0100
@@ -36,7 +36,7 @@
static int cleartxt_login(struct afp_server *server, char *username,
char *passwd);
static int cleartxt_passwd(struct afp_server *server, char *username,
- char *passwd);
+ char *passwd, char *newpasswd);
#ifdef HAVE_LIBGCRYPT
static int randnum_login(struct afp_server *server, char *username,
char *passwd);
@@ -49,8 +49,7 @@
static struct afp_uam uam_noauth =
{UAM_NOUSERAUTHENT,"No User Authent",&noauth_login,NULL,NULL};
static struct afp_uam uam_cleartxt =
- {UAM_CLEARTXTPASSWRD,"Cleartxt Passwrd",&cleartxt_login,
- &cleartxt_passwd,NULL};
+ {UAM_CLEARTXTPASSWRD,"Cleartxt Passwrd",&cleartxt_login,&cleartxt_passwd,NULL};
#ifdef HAVE_LIBGCRYPT
static struct afp_uam uam_randnum =
{UAM_RANDNUMEXCHANGE, "Randnum Exchange", &randnum_login,NULL,NULL};
@@ -219,7 +218,7 @@
* +------------------+
*/
static int cleartxt_passwd(struct afp_server *server,
- char *username, char *passwd) {
+ char *username, char *passwd, char *newpasswd) {
char *p, *ai = NULL;
int len, ret;

View file

@ -0,0 +1,30 @@
diff -ru afpfs-ng-0.8.1.old/cmdline/cmdline_testafp.c afpfs-ng-0.8.1.new/cmdline/cmdline_testafp.c
--- afpfs-ng-0.8.1.old/cmdline/cmdline_testafp.c 2025-02-06 15:22:10.187795481 +0100
+++ afpfs-ng-0.8.1.new/cmdline/cmdline_testafp.c 2025-02-06 15:30:13.226751326 +0100
@@ -31,7 +31,7 @@
snprintf(valid_url.path,sizeof(valid_url.path),"%s",path);
snprintf(valid_url.username,sizeof(valid_url.username),"%s",username);
snprintf(valid_url.password,sizeof(valid_url.password),"%s",password);
- snprintf(valid_url.uamname,(valid_url.uamname),"%s",uamname);
+ snprintf(valid_url.uamname,sizeof(valid_url.uamname),"%s",uamname);
valid_url.port=port;
if (afp_url_validate(url_string,&valid_url))
@@ -42,7 +42,7 @@
return 0;
}
-int test_urls(void)
+int test_urls(char * arg)
{
printf("Testing URL parsing\n");
diff -ru afpfs-ng-0.8.1.old/cmdline/cmdline_testafp.h afpfs-ng-0.8.1.new/cmdline/cmdline_testafp.h
--- afpfs-ng-0.8.1.old/cmdline/cmdline_testafp.h 2008-01-05 06:00:57.000000000 +0100
+++ afpfs-ng-0.8.1.new/cmdline/cmdline_testafp.h 2025-02-06 15:30:51.577987329 +0100
@@ -1,4 +1,4 @@
#ifndef __CMDLINE_TESTAFP_H_
-int test_urls(void);
+int test_urls(char * arg);
#endif

114
afpfs-ng.spec Normal file
View file

@ -0,0 +1,114 @@
Name: afpfs-ng
Version: 0.8.1
Release: %autorelease
Summary: Apple Filing Protocol client
# by default build with the fuse module
# rpmbuild --rebuild afpfs-ng.src.rpm --without fuse
%bcond_without fuse
License: GPL-2.0-or-later
URL: http://alexthepuffin.googlepages.com/home
Source0: http://downloads.sourceforge.net/afpfs-ng/%{name}-%{version}.tar.bz2
Patch0: afpfs-ng-0.8.1-overflows.patch
Patch1: afpfs-ng-0.8.1-pointer.patch
# Sent by e-mail to Alex deVries <alexthepuffin@gmail.com>
Patch2: afpfs-ng-0.8.1-formatsec.patch
Patch3: afpfs-ng-0.8.1-longoptions.patch
Patch4: afpfs-ng-0.8.1-c99.patch
Patch5: afpfs-ng-0.8.1-pointer2.patch
Patch6: afpfs-ng-0.8.1-tests.patch
%{?with_fuse:BuildRequires: fuse-devel}
BuildRequires: gcc
BuildRequires: libgcrypt-devel gmp-devel readline-devel
BuildRequires: make
BuildRequires: libtool
BuildRequires: autoconf
%description
A command line client to access files exported from Mac OS system via
Apple Filing Protocol.
%{?with_fuse:The FUSE filesystem module for AFP is in fuse-afp package}
%if 0%{?with_fuse}
%package -n fuse-afp
Summary: FUSE driver for AFP filesystem
%description -n fuse-afp
A FUSE file system server to access files exported from Mac OS system
via AppleTalk or TCP using Apple Filing Protocol.
The command line client for AFP is in fuse-afp package
%endif
%package devel
Summary: Development files for afpfs-ng
Requires: %{name} = %{version}
%description devel
Library for dynamic linking and header files of afpfs-ng.
%prep
%autosetup -p 1
libtoolize
autoreconf
%build
# make would rebuild the autoconf infrastructure due to the following:
# Prerequisite `configure.ac' is newer than target `Makefile.in'.
# Prerequisite `aclocal.m4' is newer than target `Makefile.in'.
# Prerequisite `configure.ac' is newer than target `aclocal.m4'.
touch --reference aclocal.m4 configure.ac Makefile.in
export CFLAGS="${RPM_OPT_FLAGS} -fcommon -D NeedFunctionPrototypes"
%configure %{?!with_fuse:--disable-fuse} --disable-static
make %{?_smp_mflags}
%install
%make_install
install -d %{buildroot}%{_includedir}/afpfs-ng
cp -p include/* %{buildroot}%{_includedir}/afpfs-ng
# libtool .la file works different in different versions of libtool, should not be packaged
[ -f %{buildroot}%{_libdir}/libafpclient.la ] && rm -f %{buildroot}%{_libdir}/libafpclient.la
%if ( 0%{?rhel} && 0%{?rhel} <= 7 )
%ldconfig_scriptlets
%endif
%files
%license COPYING
%{_bindir}/afpcmd
%{_bindir}/afpgetstatus
%{_mandir}/man1/afpcmd.1*
%{_mandir}/man1/afpgetstatus.1*
%{_libdir}/libafpclient.so.*
%doc AUTHORS ChangeLog docs/README docs/performance docs/FEATURES.txt docs/REPORTING-BUGS.txt
%if 0%{?with_fuse}
%files -n fuse-afp
%license COPYING
%{_bindir}/afp_client
%{_bindir}/afpfs
%{_bindir}/afpfsd
%{_bindir}/mount_afp
%{_mandir}/man1/afp_client.1*
%{_mandir}/man1/afpfsd.1*
%{_mandir}/man1/mount_afp.1*
%doc AUTHORS ChangeLog
%endif
%files devel
%{_includedir}/afpfs-ng
%{_libdir}/*.so
%changelog
%autochangelog

147
changelog Normal file
View file

@ -0,0 +1,147 @@
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-42
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Dec 21 2022 Florian Weimer <fweimer@redhat.com> - 0.8.1-41
- Port to C99
* Tue Oct 25 2022 Michal Ambroz <rebus _AT seznam.cz> - 0.8.1-40
- remove the libafpclient.la libtool file
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Nov 17 2021 Michal Ambroz <rebus _AT seznam.cz> - 0.8.1-37
- update embedded libtool (ltmain.sh)
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Apr 26 2021 Michal Ambroz <rebus _AT seznam.cz> - 0.8.1-35
- modernize spec, push the bugfix to active branches
* Fri Mar 12 2021 Michal Ambroz <rebus _AT seznam.cz> - 0.8.1-34
- fix issue 1507944
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Jul 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-32
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Apr 22 2020 Michal Ambroz <rebus _AT seznam.cz> - 0.8.1-30
- fix FTBFS - multiple definition of - build legacy code with -fcommon
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.8.1-27
- Rebuild for readline 8.0
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Nov 25 2014 <hguemar@fedoraproject.org> - 0.8.1-18
- Fix mount_afp crash (RHBZ #1165296)
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Apr 22 2014 Tomáš Mráz <tmraz@redhat.com> - 0.8.1-15
- Rebuild for new libgcrypt
* Wed Dec 04 2013 Lubomir Rintel <lkundrak@v3.sk> - 0.8.1-14
- Fix build with -Werror=format-security
* Thu Oct 24 2013 Lubomir Rintel <lkundrak@v3.sk> - 0.8.1-13.3
- Bulk sad and useless attempt at consistent SPEC file formatting
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-12.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-11.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-10.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-9.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Thu Oct 20 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.8.1-8.3
- rebuild with new gmp without compat lib
* Mon Oct 10 2011 Peter Schiffer <pschiffe@redhat.com> - 0.8.1-8.2
- rebuild with new gmp
* Mon Sep 26 2011 Peter Schiffer <pschiffe@redhat.com> - 0.8.1-8.1
- rebuild with new gmp
* Mon Jul 4 2011 Jan F. Chadima <jchadima@redhat.com> - 0.8.1-8
- Repair ponter arithmetic
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Sep 17 2009 Peter Lemenkov <lemenkov@gmail.com> - 0.8.1-6
- Rebuild with new fuse
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Fri Jul 17 2009 Lubomir Rintel <lkundrak@v3.sk> - 0.8.1-4
- Don't refer to AppleTalk in Summary
* Tue Jul 14 2009 Lubomir Rintel <lkundrak@v3.sk> - 0.8.1-3
- Fix up license tag
* Thu Mar 19 2009 Lubomir Rintel <lkundrak@v3.sk> - 0.8.1-2
- Add more include files (Jan F. Chadima)
- Don't needlessly build static library (Stefan Kasal)
- Fix fuse-afp summary (Stefan Kasal)
- Remove redundant license file from -devel (Stefan Kasal)
* Mon Oct 6 2008 Lubomir Rintel <lkundrak@v3.sk> - 0.8.1-1
- Initial packaging attempt

View file

@ -0,0 +1 @@
1bdd9f8a06e6085ea4cc38ce010ef60b afpfs-ng-0.8.1.tar.bz2