aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2011-06-25 01:45:04 +0800
committerdinoex <dinoex@FreeBSD.org>2011-06-25 01:45:04 +0800
commit5fa5e8f8d710ccc364afe5e918e39ddde81de675 (patch)
tree07f7c83f2d34ab82882bf3f24eda87ac8672f9b6
parentcd399f8120c351cdd5008c04f6cafb992691741c (diff)
downloadfreebsd-ports-gnome-5fa5e8f8d710ccc364afe5e918e39ddde81de675.tar.gz
freebsd-ports-gnome-5fa5e8f8d710ccc364afe5e918e39ddde81de675.tar.zst
freebsd-ports-gnome-5fa5e8f8d710ccc364afe5e918e39ddde81de675.zip
- cleanup compiler warnings
-rw-r--r--www/smb_auth/Makefile2
-rw-r--r--www/smb_auth/files/patch-smb_auth.c80
2 files changed, 81 insertions, 1 deletions
diff --git a/www/smb_auth/Makefile b/www/smb_auth/Makefile
index d96eccffef18..e049512524c1 100644
--- a/www/smb_auth/Makefile
+++ b/www/smb_auth/Makefile
@@ -7,7 +7,7 @@
PORTNAME= smb_auth
PORTVERSION= 0.05
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= dinoex
diff --git a/www/smb_auth/files/patch-smb_auth.c b/www/smb_auth/files/patch-smb_auth.c
new file mode 100644
index 000000000000..332dbcdd6a07
--- /dev/null
+++ b/www/smb_auth/files/patch-smb_auth.c
@@ -0,0 +1,80 @@
+--- smb_auth.c.orig 1999-09-28 21:31:26.000000000 +0200
++++ smb_auth.c 2011-06-24 19:33:54.000000000 +0200
+@@ -29,11 +29,11 @@
+ {
+ char *name; /* domain name */
+ char *sname; /* match this with user input */
+- char *passthrough; /* pass-through authentication */
+- char *nmbaddr; /* name service address */
++ const char *passthrough; /* pass-through authentication */
++ const char *nmbaddr; /* name service address */
+ int nmbcast; /* broadcast or unicast */
+ char *authshare; /* share name of auth file */
+- char *authfile; /* pathname of auth file */
++ const char *authfile; /* pathname of auth file */
+ struct SMBDOMAIN *next; /* linked list */
+ };
+
+@@ -73,7 +73,7 @@
+ }
+ }
+
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+ int i;
+ char buf[BUFSIZE];
+@@ -84,11 +84,11 @@
+ char *domname;
+ FILE *p;
+ int debug = 0;
+- char *shcmd;
++ const char *shcmd;
+
+ /* make standard output line buffered */
+ if (setvbuf(stdout, NULL, _IOLBF, 0) != 0)
+- return;
++ return 1;
+
+ /* parse command line arguments */
+ for (i = 1; i < argc; i++)
+@@ -106,13 +106,13 @@
+ if (strcmp(argv[i], "-W") == 0)
+ {
+ if ((dom = (struct SMBDOMAIN *) malloc(sizeof(struct SMBDOMAIN))) == NULL)
+- return;
++ return 1;
+
+ dom->name = dom->sname = argv[++i];
+ dom->passthrough = "";
+ dom->nmbaddr = "";
+ dom->nmbcast = NMB_BROADCAST;
+- dom->authshare = "NETLOGON";
++ dom->authshare = strdup( "NETLOGON" );
+ dom->authfile = "proxyauth";
+ dom->next = NULL;
+
+@@ -165,7 +165,7 @@
+ if (lastdom != NULL)
+ {
+ if ((lastdom->authshare = strdup(argv[++i])) == NULL)
+- return;
++ return 1;
+
+ /* convert backslashes to forward slashes */
+ for (s = lastdom->authshare; *s != '\0'; s++)
+@@ -190,7 +190,7 @@
+
+ /* pass to helper script */
+ if (putenv("SAMBAPREFIX=" SAMBAPREFIX) != 0)
+- return;
++ return 1;
+
+ while (1)
+ {
+@@ -258,4 +258,5 @@
+ (void) printf("ERR\n");
+
+ } /* while (1) */
++ return 1;
+ }