summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-08-19 21:25:58 +1000
committerPaul Mackerras <paulus@samba.org>2008-08-19 21:25:58 +1000
commit8d07ad78c8a32b9c89bfcea25d775e8440fd4172 (patch)
treeab722ca2209d599412509188c472617c3c6951a7
parent860a540431d92632fc19e7f6cf7b06c92fe1ee1e (diff)
downloadppp-8d07ad78c8a32b9c89bfcea25d775e8440fd4172.tar.gz
Remove various warnings, fix pppol2tp install
This fixes a collection of minor things that were resulting in harmless warnings (accidental trigraphs, missing prototypes, signed/unsigned char being used interchangeably) and corrects an error in the pppol2tp makefile, which meant that it wasn't installing anything. Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--chat/chat.c2
-rw-r--r--pppd/ipxcp.c18
-rw-r--r--pppd/md5.c2
-rw-r--r--pppd/md5.h6
-rw-r--r--pppd/plugins/pppol2tp/Makefile.linux2
-rw-r--r--pppd/session.c4
6 files changed, 18 insertions, 16 deletions
diff --git a/chat/chat.c b/chat/chat.c
index dc6cf2e..0b88c27 100644
--- a/chat/chat.c
+++ b/chat/chat.c
@@ -1303,7 +1303,7 @@ register char *s;
if (verbose) {
if (quiet)
- msgf("send (??????)");
+ msgf("send (?????\?)");
else
msgf("send (%v)", s);
}
diff --git a/pppd/ipxcp.c b/pppd/ipxcp.c
index f0ee696..7b2343e 100644
--- a/pppd/ipxcp.c
+++ b/pppd/ipxcp.c
@@ -289,7 +289,7 @@ static int
setipxnode(argv)
char **argv;
{
- char *end;
+ u_char *end;
int have_his = 0;
u_char our_node[6];
u_char his_node[6];
@@ -343,7 +343,7 @@ static int
setipxname (argv)
char **argv;
{
- char *dest = ipxcp_wantoptions[0].name;
+ u_char *dest = ipxcp_wantoptions[0].name;
char *src = *argv;
int count;
char ch;
@@ -593,7 +593,7 @@ ipxcp_cilen(f)
len = go->neg_nn ? CILEN_NETN : 0;
len += go->neg_node ? CILEN_NODEN : 0;
- len += go->neg_name ? CILEN_NAME + strlen (go->name) - 1 : 0;
+ len += go->neg_name ? CILEN_NAME + strlen ((char *)go->name) - 1 : 0;
/* RFC says that defaults should not be included. */
if (go->neg_router && to_external(go->router) != RIP_SAP)
@@ -630,7 +630,7 @@ ipxcp_addci(f, ucp, lenp)
}
if (go->neg_name) {
- int cilen = strlen (go->name);
+ int cilen = strlen ((char *)go->name);
int indx;
PUTCHAR (IPX_ROUTER_NAME, ucp);
PUTCHAR (CILEN_NAME + cilen - 1, ucp);
@@ -699,7 +699,7 @@ ipxcp_ackci(f, p, len)
}
#define ACKCINODE(opt,neg,val) ACKCICHARS(opt,neg,val,sizeof(val))
-#define ACKCINAME(opt,neg,val) ACKCICHARS(opt,neg,val,strlen(val))
+#define ACKCINAME(opt,neg,val) ACKCICHARS(opt,neg,val,strlen((char *)val))
#define ACKCINETWORK(opt, neg, val) \
if (neg) { \
@@ -923,7 +923,7 @@ ipxcp_rejci(f, p, len)
}
#define REJCINODE(opt,neg,val) REJCICHARS(opt,neg,val,sizeof(val))
-#define REJCINAME(opt,neg,val) REJCICHARS(opt,neg,val,strlen(val))
+#define REJCINAME(opt,neg,val) REJCICHARS(opt,neg,val,strlen((char *)val))
#define REJCIVOID(opt, neg) \
if (neg && p[0] == opt) { \
@@ -1453,8 +1453,8 @@ ipxcp_script(f, script)
argv[6] = strremote;
argv[7] = strproto_lcl;
argv[8] = strproto_rmt;
- argv[9] = go->name;
- argv[10] = ho->name;
+ argv[9] = (char *)go->name;
+ argv[10] = (char *)ho->name;
argv[11] = ipparam;
argv[12] = strpid;
argv[13] = NULL;
@@ -1580,7 +1580,7 @@ ipxcp_printpkt(p, plen, printer, arg)
case TERMREQ:
if (len > 0 && *p >= ' ' && *p < 0x7f) {
printer(arg, " ");
- print_string(p, len, printer, arg);
+ print_string((char *)p, len, printer, arg);
p += len;
len = 0;
}
diff --git a/pppd/md5.c b/pppd/md5.c
index 2039760..f1291ce 100644
--- a/pppd/md5.c
+++ b/pppd/md5.c
@@ -48,7 +48,7 @@
*/
/* forward declaration */
-static void Transform ();
+static void Transform (UINT4 *buf, UINT4 *in);
static unsigned char PADDING[64] = {
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
diff --git a/pppd/md5.h b/pppd/md5.h
index f7a0c96..71e8b00 100644
--- a/pppd/md5.h
+++ b/pppd/md5.h
@@ -57,9 +57,9 @@ typedef struct {
unsigned char digest[16]; /* actual digest after MD5Final call */
} MD5_CTX;
-void MD5_Init ();
-void MD5_Update ();
-void MD5_Final ();
+void MD5_Init (MD5_CTX *mdContext);
+void MD5_Update (MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen);
+void MD5_Final (unsigned char hash[], MD5_CTX *mdContext);
#define __MD5_INCLUDE__
#endif /* __MD5_INCLUDE__ */
diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux
index efc6554..19eff67 100644
--- a/pppd/plugins/pppol2tp/Makefile.linux
+++ b/pppd/plugins/pppol2tp/Makefile.linux
@@ -20,7 +20,7 @@ all: $(PLUGINS)
install: all
$(INSTALL) -d -m 755 $(LIBDIR)
- $(INSTALL) -c -m 4550 $(PLUGIN) $(LIBDIR)
+ $(INSTALL) -c -m 4550 $(PLUGINS) $(LIBDIR)
clean:
rm -f *.o *.so
diff --git a/pppd/session.c b/pppd/session.c
index 491d3bf..db70b43 100644
--- a/pppd/session.c
+++ b/pppd/session.c
@@ -372,11 +372,13 @@ session_start(flags, user, passwd, ttyName, msg)
if (pw != NULL) {
struct lastlog ll;
int fd;
+ time_t tnow;
if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) {
(void)lseek(fd, (off_t)(pw->pw_uid * sizeof(ll)), SEEK_SET);
memset((void *)&ll, 0, sizeof(ll));
- (void)time(&ll.ll_time);
+ (void)time(&tnow);
+ ll.ll_time = tnow;
(void)strncpy(ll.ll_line, ttyName, sizeof(ll.ll_line));
(void)strncpy(ll.ll_host, ifname, sizeof(ll.ll_host));
(void)write(fd, (char *)&ll, sizeof(ll));