aboutsummaryrefslogtreecommitdiff
path: root/nis
diff options
context:
space:
mode:
Diffstat (limited to 'nis')
-rw-r--r--nis/nis_call.c2
-rw-r--r--nis/nis_intern.h2
-rw-r--r--nis/nss_nis/nis-publickey.c8
-rw-r--r--nis/nss_nisplus/nisplus-alias.c6
-rw-r--r--nis/nss_nisplus/nisplus-ethers.c14
-rw-r--r--nis/nss_nisplus/nisplus-grp.c6
-rw-r--r--nis/nss_nisplus/nisplus-hosts.c16
-rw-r--r--nis/nss_nisplus/nisplus-netgrp.c12
-rw-r--r--nis/nss_nisplus/nisplus-network.c13
-rw-r--r--nis/nss_nisplus/nisplus-proto.c12
-rw-r--r--nis/nss_nisplus/nisplus-publickey.c6
-rw-r--r--nis/nss_nisplus/nisplus-pwd.c6
-rw-r--r--nis/nss_nisplus/nisplus-rpc.c12
-rw-r--r--nis/nss_nisplus/nisplus-service.c14
-rw-r--r--nis/nss_nisplus/nisplus-spwd.c6
-rw-r--r--nis/ypclnt.c7
16 files changed, 61 insertions, 81 deletions
diff --git a/nis/nis_call.c b/nis/nis_call.c
index 1dfb129..6727550 100644
--- a/nis/nis_call.c
+++ b/nis/nis_call.c
@@ -151,7 +151,6 @@ __bind_connect (dir_binding *dbp)
if (dbp->use_auth)
{
-#if defined(HAVE_SECURE_RPC)
if (serv->key_type == NIS_PK_DH)
{
char netname[MAXNETNAMELEN+1];
@@ -168,7 +167,6 @@ __bind_connect (dir_binding *dbp)
dbp->clnt->cl_auth = authunix_create_default ();
}
else
-#endif
dbp->clnt->cl_auth = authunix_create_default ();
dbp->use_auth = TRUE;
}
diff --git a/nis/nis_intern.h b/nis/nis_intern.h
index fdc392a..9852c24 100644
--- a/nis/nis_intern.h
+++ b/nis/nis_intern.h
@@ -52,10 +52,8 @@ extern nis_error __do_niscall __P ((const_nis_name name, u_long prog,
xdrproc_t xargs, caddr_t req,
xdrproc_t xres, caddr_t resp,
u_long flags));
-#if defined (HAVE_SECURE_RPC)
extern AUTH *authdes_pk_create __P ((const char *, const netobj *, u_int,
struct sockaddr *, des_block *));
-#endif
/* NIS+ cache */
extern directory_obj *__cache_search __P ((const_nis_name name));
diff --git a/nis/nss_nis/nis-publickey.c b/nis/nss_nis/nis-publickey.c
index ade09c4..4c921f4 100644
--- a/nis/nss_nis/nis-publickey.c
+++ b/nis/nss_nis/nis-publickey.c
@@ -25,10 +25,8 @@
#include <rpc/rpc.h>
#include <rpcsvc/yp.h>
#include <rpcsvc/ypclnt.h>
-#if defined (HAVE_SECURE_RPC)
#include <rpc/key_prot.h>
extern int xdecrypt (char *, char *);
-#endif
#include "nss-nis.h"
@@ -39,7 +37,7 @@ _nss_nis_getpublickey (const char *netname, char *pkey)
enum nss_status retval;
char *domain, *result;
int len;
-
+
pkey[0] = 0;
if (netname == NULL)
@@ -76,7 +74,6 @@ _nss_nis_getpublickey (const char *netname, char *pkey)
enum nss_status
_nss_nis_getsecretkey (const char *netname, char *skey, char *passwd)
{
-#if defined (HAVE_SECURE_RPC)
enum nss_status retval;
char buf[1024];
char *domain, *result;
@@ -122,9 +119,6 @@ _nss_nis_getsecretkey (const char *netname, char *skey, char *passwd)
buf[HEXKEYBYTES] = 0;
strcpy (skey, buf);
}
-#else
- skey[0] = 0;
-#endif
return NSS_STATUS_SUCCESS;
}
diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c
index 8d682d7..f074c5f 100644
--- a/nis/nss_nisplus/nisplus-alias.c
+++ b/nis/nss_nisplus/nisplus-alias.c
@@ -48,9 +48,9 @@ _nss_create_tablename (void)
char buf [40 + strlen (nis_local_directory ())];
char *p;
- p = stpcpy (buf, "mail_aliases.org_dir.");
- p = stpcpy (p, nis_local_directory ());
- tablename_val = strdup (buf);
+ p = __stpcpy (buf, "mail_aliases.org_dir.");
+ p = __stpcpy (p, nis_local_directory ());
+ tablename_val = __strdup (buf);
if (tablename_val == NULL)
return NSS_STATUS_TRYAGAIN;
tablename_len = strlen (tablename_val);
diff --git a/nis/nss_nisplus/nisplus-ethers.c b/nis/nss_nisplus/nisplus-ethers.c
index cfdb3dc..b21c276 100644
--- a/nis/nss_nisplus/nisplus-ethers.c
+++ b/nis/nss_nisplus/nisplus-ethers.c
@@ -92,9 +92,9 @@ _nss_create_tablename (void)
char buf [40 + strlen (nis_local_directory ())];
char *p;
- p = stpcpy (buf, "ethers.org_dir.");
- p = stpcpy (p, nis_local_directory ());
- tablename_val = strdup (buf);
+ p = __stpcpy (buf, "ethers.org_dir.");
+ p = __stpcpy (p, nis_local_directory ());
+ tablename_val = __strdup (buf);
if (tablename_val == NULL)
return NSS_STATUS_TRYAGAIN;
tablename_len = strlen (tablename_val);
@@ -267,10 +267,10 @@ _nss_nisplus_getntohost_r (const struct ether_addr *addr,
char buf[255 + tablename_len];
memset (&buf, '\0', sizeof (buf));
- snprintf(buf, sizeof (buf), "[addr=%x:%x:%x:%x:%x:%x],ethers.org_dir",
- addr->ether_addr_octet[0], addr->ether_addr_octet[1],
- addr->ether_addr_octet[2], addr->ether_addr_octet[3],
- addr->ether_addr_octet[4], addr->ether_addr_octet[5]);
+ sprintf(buf, "[addr=%x:%x:%x:%x:%x:%x],ethers.org_dir",
+ addr->ether_addr_octet[0], addr->ether_addr_octet[1],
+ addr->ether_addr_octet[2], addr->ether_addr_octet[3],
+ addr->ether_addr_octet[4], addr->ether_addr_octet[5]);
result = nis_list(buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
diff --git a/nis/nss_nisplus/nisplus-grp.c b/nis/nss_nisplus/nisplus-grp.c
index 1031d69..fb20032 100644
--- a/nis/nss_nisplus/nisplus-grp.c
+++ b/nis/nss_nisplus/nisplus-grp.c
@@ -43,9 +43,9 @@ _nss_create_tablename (void)
char buf [40 + strlen (nis_local_directory ())];
char *p;
- p = stpcpy (buf, "group.org_dir.");
- p = stpcpy (p, nis_local_directory ());
- tablename_val = strdup (buf);
+ p = __stpcpy (buf, "group.org_dir.");
+ p = __stpcpy (p, nis_local_directory ());
+ tablename_val = __strdup (buf);
if (tablename_val == NULL)
return NSS_STATUS_TRYAGAIN;
tablename_len = strlen (tablename_val);
diff --git a/nis/nss_nisplus/nisplus-hosts.c b/nis/nss_nisplus/nisplus-hosts.c
index 89a8bf7..7fefec0 100644
--- a/nis/nss_nisplus/nisplus-hosts.c
+++ b/nis/nss_nisplus/nisplus-hosts.c
@@ -98,8 +98,8 @@ _nss_nisplus_parse_hostent (nis_result *result, int af, struct hostent *host,
if (NISENTRYLEN (0, 0, result) + 1 > room_left)
goto no_more_room;
- p = stpncpy (first_unused, NISENTRYVAL (0, 0, result),
- NISENTRYLEN (0, 0, result));
+ p = __stpncpy (first_unused, NISENTRYVAL (0, 0, result),
+ NISENTRYLEN (0, 0, result));
*p = '\0';
room_left -= (NISENTRYLEN (0, 0, result) + 1);
host->h_name = first_unused;
@@ -115,8 +115,8 @@ _nss_nisplus_parse_hostent (nis_result *result, int af, struct hostent *host,
goto no_more_room;
*p++ = ' ';
- p = stpncpy (p, NISENTRYVAL (i, 1, result),
- NISENTRYLEN (i, 1, result));
+ p = __stpncpy (p, NISENTRYVAL (i, 1, result),
+ NISENTRYLEN (i, 1, result));
*p = '\0';
room_left -= (NISENTRYLEN (i, 1, result) + 1);
}
@@ -176,9 +176,9 @@ _nss_create_tablename (void)
char buf [40 + strlen (nis_local_directory ())];
char *p;
- p = stpcpy (buf, "hosts.org_dir.");
- p = stpcpy (p, nis_local_directory ());
- tablename_val = strdup (buf);
+ p = __stpcpy (buf, "hosts.org_dir.");
+ p = __stpcpy (p, nis_local_directory ());
+ tablename_val = __strdup (buf);
if (tablename_val == NULL)
return NSS_STATUS_TRYAGAIN;
tablename_len = strlen (tablename_val);
@@ -415,7 +415,7 @@ _nss_nisplus_gethostbyaddr_r (const char *addr, int addrlen, int type,
char buf[255 + tablename_len];
int retval, parse_res;
- snprintf(buf, sizeof (buf) -1, "[addr=%s],%s",
+ sprintf (buf, "[addr=%s],%s",
inet_ntoa (*(struct in_addr *)addr), tablename_val);
result = nis_list(buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
diff --git a/nis/nss_nisplus/nisplus-netgrp.c b/nis/nss_nisplus/nisplus-netgrp.c
index 967eec8..2a2f4b5 100644
--- a/nis/nss_nisplus/nisplus-netgrp.c
+++ b/nis/nss_nisplus/nisplus-netgrp.c
@@ -92,8 +92,8 @@ _nss_nisplus_parse_netgroup (struct __netgrent *result, char *buffer,
else
{
result->val.triple.host = cp;
- cp = stpncpy (cp, NISENTRYVAL (position, 2, data),
- NISENTRYLEN (position, 2, data));
+ cp = __stpncpy (cp, NISENTRYVAL (position, 2, data),
+ NISENTRYLEN (position, 2, data));
*cp = '\0';
++cp;
}
@@ -103,8 +103,8 @@ _nss_nisplus_parse_netgroup (struct __netgrent *result, char *buffer,
else
{
result->val.triple.user = cp;
- cp = stpncpy (cp, NISENTRYVAL (position, 3, data),
- NISENTRYLEN (position, 3, data));
+ cp = __stpncpy (cp, NISENTRYVAL (position, 3, data),
+ NISENTRYLEN (position, 3, data));
*cp = '\0';
++cp;
}
@@ -114,8 +114,8 @@ _nss_nisplus_parse_netgroup (struct __netgrent *result, char *buffer,
else
{
result->val.triple.domain = cp;
- cp = stpncpy (cp, NISENTRYVAL (position, 4, data),
- NISENTRYLEN (position, 4, data));
+ cp = __stpncpy (cp, NISENTRYVAL (position, 4, data),
+ NISENTRYLEN (position, 4, data));
*cp = '\0';
}
diff --git a/nis/nss_nisplus/nisplus-network.c b/nis/nss_nisplus/nisplus-network.c
index ff71af8..8aa8bc0 100644
--- a/nis/nss_nisplus/nisplus-network.c
+++ b/nis/nss_nisplus/nisplus-network.c
@@ -87,8 +87,8 @@ _nss_nisplus_parse_netent (nis_result *result, struct netent *network,
goto no_more_room;
*p++ = ' ';
- p = stpncpy (p, NISENTRYVAL (i, 1, result),
- NISENTRYLEN (i, 1, result));
+ p = __stpncpy (p, NISENTRYVAL (i, 1, result),
+ NISENTRYLEN (i, 1, result));
*p = '\0';
room_left -= (NISENTRYLEN (i, 1, result) + 1);
}
@@ -149,9 +149,9 @@ _nss_create_tablename (void)
char buf [40 + strlen (nis_local_directory ())];
char *p;
- p = stpcpy (buf, "networks.org_dir.");
- p = stpcpy (p, nis_local_directory ());
- tablename_val = strdup (buf);
+ p = __stpcpy (buf, "networks.org_dir.");
+ p = __stpcpy (p, nis_local_directory ());
+ tablename_val = __strdup (buf);
if (tablename_val == NULL)
return NSS_STATUS_TRYAGAIN;
tablename_len = strlen (tablename_val);
@@ -366,8 +366,7 @@ _nss_nisplus_getnetbyaddr_r (const unsigned long addr, const int type,
struct in_addr in;
in = inet_makeaddr (addr, 0);
- snprintf(buf, sizeof (buf) - 1, "[addr=%s],%s",
- inet_ntoa (in), tablename_len);
+ sprintf (buf, "[addr=%s],%s", inet_ntoa (in), tablename_val);
result = nis_list(buf, EXPAND_NAME, NULL, NULL);
diff --git a/nis/nss_nisplus/nisplus-proto.c b/nis/nss_nisplus/nisplus-proto.c
index ddfce86..b64d4bd 100644
--- a/nis/nss_nisplus/nisplus-proto.c
+++ b/nis/nss_nisplus/nisplus-proto.c
@@ -85,8 +85,8 @@ _nss_nisplus_parse_protoent (nis_result * result, struct protoent *proto,
if (NISENTRYLEN (i, 1, result) + 2 > room_left)
goto no_more_room;
*p++ = ' ';
- p = stpncpy (p, NISENTRYVAL (i, 1, result),
- NISENTRYLEN (i, 1, result));
+ p = __stpncpy (p, NISENTRYVAL (i, 1, result),
+ NISENTRYLEN (i, 1, result));
*p = '\0';
room_left -= (NISENTRYLEN (i, 1, result) + 1);
}
@@ -143,9 +143,9 @@ _nss_create_tablename (void)
char buf [40 + strlen (nis_local_directory ())];
char *p;
- p = stpcpy (buf, "protocols.org_dir.");
- p = stpcpy (p, nis_local_directory ());
- tablename_val = strdup (buf);
+ p = __stpcpy (buf, "protocols.org_dir.");
+ p = __stpcpy (p, nis_local_directory ());
+ tablename_val = __strdup (buf);
if (tablename_val == NULL)
return NSS_STATUS_TRYAGAIN;
tablename_len = strlen (tablename_val);
@@ -327,7 +327,7 @@ _nss_nisplus_getprotobynumber_r (const int number, struct protoent *proto,
nis_result *result;
char buf[46 + tablename_len];
- snprintf (buf, sizeof (buf), "[number=%d],%s", number, tablename_val);
+ sprintf (buf, "[number=%d],%s", number, tablename_val);
result = nis_list (buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL);
diff --git a/nis/nss_nisplus/nisplus-publickey.c b/nis/nss_nisplus/nisplus-publickey.c
index 99ec2a0..72ed1a5 100644
--- a/nis/nss_nisplus/nisplus-publickey.c
+++ b/nis/nss_nisplus/nisplus-publickey.c
@@ -25,10 +25,8 @@
#include <syslog.h>
#include <rpc/rpc.h>
#include <rpcsvc/nis.h>
-#ifdef HAVE_SECURE_RPC
#include <rpc/key_prot.h>
extern int xdecrypt (char *, char *);
-#endif
#include <nss-nisplus.h>
@@ -107,7 +105,6 @@ _nss_nisplus_getpublickey (const char *netname, char *pkey)
enum nss_status
_nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd)
{
-#ifdef HAVE_SECURE_RPC
nis_result *res;
enum nss_status retval;
char buf[NIS_MAXNAMELEN+2];
@@ -179,9 +176,6 @@ _nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd)
buf[HEXKEYBYTES] = 0;
strcpy (skey, buf);
-#else
- skey[0] = 0;
-#endif
return NSS_STATUS_SUCCESS;
}
diff --git a/nis/nss_nisplus/nisplus-pwd.c b/nis/nss_nisplus/nisplus-pwd.c
index e358b06..3974def 100644
--- a/nis/nss_nisplus/nisplus-pwd.c
+++ b/nis/nss_nisplus/nisplus-pwd.c
@@ -43,9 +43,9 @@ _nss_create_tablename (void)
char buf [40 + strlen (nis_local_directory ())];
char *p;
- p = stpcpy (buf, "passwd.org_dir.");
- p = stpcpy (p, nis_local_directory ());
- tablename_val = strdup (buf);
+ p = __stpcpy (buf, "passwd.org_dir.");
+ p = __stpcpy (p, nis_local_directory ());
+ tablename_val = __strdup (buf);
if (tablename_val == NULL)
return NSS_STATUS_TRYAGAIN;
tablename_len = strlen (tablename_val);
diff --git a/nis/nss_nisplus/nisplus-rpc.c b/nis/nss_nisplus/nisplus-rpc.c
index 6682a75..e93a516 100644
--- a/nis/nss_nisplus/nisplus-rpc.c
+++ b/nis/nss_nisplus/nisplus-rpc.c
@@ -82,8 +82,8 @@ _nss_nisplus_parse_rpcent (nis_result *result, struct rpcent *rpc,
if (NISENTRYLEN (i, 1, result) + 2 > room_left)
goto no_more_room;
*p++ = ' ';
- p = stpncpy (p, NISENTRYVAL (i, 1, result),
- NISENTRYLEN (i, 1, result));
+ p = __stpncpy (p, NISENTRYVAL (i, 1, result),
+ NISENTRYLEN (i, 1, result));
*p = '\0';
room_left -= (NISENTRYLEN (i, 1, result) + 1);
}
@@ -144,9 +144,9 @@ _nss_create_tablename (void)
char buf [40 + strlen (nis_local_directory ())];
char *p;
- p = stpcpy (buf, "rpc.org_dir.");
- p = stpcpy (p, nis_local_directory ());
- tablename_val = strdup (buf);
+ p = __stpcpy (buf, "rpc.org_dir.");
+ p = __stpcpy (p, nis_local_directory ());
+ tablename_val = __strdup (buf);
if (tablename_val == NULL)
return NSS_STATUS_TRYAGAIN;
tablename_len = strlen (tablename_val);
@@ -329,7 +329,7 @@ _nss_nisplus_getrpcbynumber_r (const int number, struct rpcent *rpc,
nis_result *result;
char buf[100 + tablename_len];
- snprintf (buf, sizeof (buf), "[number=%d],%s", number, tablename_val);
+ sprintf (buf, "[number=%d],%s", number, tablename_val);
result = nis_list(buf, FOLLOW_LINKS | FOLLOW_PATH, NULL, NULL);
diff --git a/nis/nss_nisplus/nisplus-service.c b/nis/nss_nisplus/nisplus-service.c
index e8a1214..e1a89f9 100644
--- a/nis/nss_nisplus/nisplus-service.c
+++ b/nis/nss_nisplus/nisplus-service.c
@@ -91,8 +91,8 @@ _nss_nisplus_parse_servent (nis_result *result, struct servent *serv,
if (NISENTRYLEN (i, 1, result) + 2 > room_left)
goto no_more_room;
*p++ = ' ';
- p = stpncpy (p, NISENTRYVAL (i, 1, result),
- NISENTRYLEN (i, 1, result));
+ p = __stpncpy (p, NISENTRYVAL (i, 1, result),
+ NISENTRYLEN (i, 1, result));
*p = '\0';
room_left -= (NISENTRYLEN (i, 1, result) + 1);
}
@@ -150,9 +150,9 @@ _nss_create_tablename (void)
char buf [40 + strlen (nis_local_directory ())];
char *p;
- p = stpcpy (buf, "services.org_dir.");
- p = stpcpy (p, nis_local_directory ());
- tablename_val = strdup (buf);
+ p = __stpcpy (buf, "services.org_dir.");
+ p = __stpcpy (p, nis_local_directory ());
+ tablename_val = __strdup (buf);
if (tablename_val == NULL)
return NSS_STATUS_TRYAGAIN;
tablename_len = strlen (tablename_val);
@@ -348,8 +348,8 @@ _nss_nisplus_getservbynumber_r (const int number, const char *protocol,
nis_result *result;
char buf[60 + strlen (protocol) + tablename_len];
- snprintf (buf, sizeof (buf), "[number=%d,proto=%s],%s",
- number, protocol, tablename_val);
+ sprintf (buf, "[number=%d,proto=%s],%s",
+ number, protocol, tablename_val);
result = nis_list (buf, FOLLOW_PATH | FOLLOW_LINKS, NULL, NULL);
diff --git a/nis/nss_nisplus/nisplus-spwd.c b/nis/nss_nisplus/nisplus-spwd.c
index 507aa4b..1b3f683 100644
--- a/nis/nss_nisplus/nisplus-spwd.c
+++ b/nis/nss_nisplus/nisplus-spwd.c
@@ -41,9 +41,9 @@ _nss_create_tablename (void)
char buf [40 + strlen (nis_local_directory ())];
char *p;
- p = stpcpy (buf, "passwd.org_dir.");
- p = stpcpy (p, nis_local_directory ());
- tablename_val = strdup (buf);
+ p = __stpcpy (buf, "passwd.org_dir.");
+ p = __stpcpy (p, nis_local_directory ());
+ tablename_val = __strdup (buf);
if (tablename_val == NULL)
return NSS_STATUS_TRYAGAIN;
tablename_len = strlen (tablename_val);
diff --git a/nis/ypclnt.c b/nis/ypclnt.c
index 7c9efec..c8db8a8 100644
--- a/nis/ypclnt.c
+++ b/nis/ypclnt.c
@@ -21,6 +21,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <bits/libc-lock.h>
+#include <rpc/auth.h>
#include <rpc/rpc.h>
#include <rpcsvc/nis.h>
#include <rpcsvc/yp.h>
@@ -627,7 +628,7 @@ yp_all (const char *indomain, const char *inmap,
clnt = clnttcp_create (&clnt_sin, YPPROG, YPVERS, &clnt_sock, 0, 0);
if (clnt == NULL)
{
- puts ("yp_all: clnttcp_create failed");
+ puts (_("yp_all: clnttcp_create failed"));
__libc_lock_unlock (ypbindlist_lock);
return YPERR_PMAP;
}
@@ -787,7 +788,6 @@ int
yp_update (char *domain, char *map, unsigned ypop,
char *key, int keylen, char *data, int datalen)
{
-#if defined (HAVE_SECURE_RPC)
union
{
ypupdate_args update_args;
@@ -872,7 +872,4 @@ again:
return YPERR_RPC;
}
return res;
-#else
- return YPERR_YPERR;
-#endif
}