summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2012-10-02 19:00:56 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2012-10-02 19:00:56 +0000
commitf3c3ef7b2a3a6eb0501b88f262c01a44f727a29c (patch)
treeaa44b26240a05517bc18100b05e2fdf7e2618175
parent48b5c7410f9707ac3a7d027ceba1b607d78d8a59 (diff)
Notes
-rw-r--r--include/rpc/auth.h9
-rw-r--r--include/rpc/auth_unix.h6
-rw-r--r--lib/libc/rpc/auth_unix.c10
-rw-r--r--lib/libc/rpc/authunix_prot.c6
-rw-r--r--lib/libc/rpc/rpc_soc.32
-rw-r--r--lib/libc/rpc/svc_auth_unix.c2
-rw-r--r--sys/rpc/auth.h9
7 files changed, 20 insertions, 24 deletions
diff --git a/include/rpc/auth.h b/include/rpc/auth.h
index d39ad1205379..5833c02e429f 100644
--- a/include/rpc/auth.h
+++ b/include/rpc/auth.h
@@ -243,14 +243,13 @@ __END_DECLS
* System style authentication
* AUTH *authunix_create(machname, uid, gid, len, aup_gids)
* char *machname;
- * int uid;
- * int gid;
+ * uid_t uid;
+ * gid_t gid;
* int len;
- * int *aup_gids;
+ * gid_t *aup_gids;
*/
__BEGIN_DECLS
-extern AUTH *authunix_create(char *, int, int, int,
- int *);
+extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *);
extern AUTH *authunix_create_default(void); /* takes no parameters */
extern AUTH *authnone_create(void); /* takes no parameters */
__END_DECLS
diff --git a/include/rpc/auth_unix.h b/include/rpc/auth_unix.h
index 48373b2c24c7..08e156900db1 100644
--- a/include/rpc/auth_unix.h
+++ b/include/rpc/auth_unix.h
@@ -60,10 +60,10 @@
struct authunix_parms {
u_long aup_time;
char *aup_machname;
- int aup_uid;
- int aup_gid;
+ uid_t aup_uid;
+ gid_t aup_gid;
u_int aup_len;
- int *aup_gids;
+ gid_t *aup_gids;
};
#define authsys_parms authunix_parms
diff --git a/lib/libc/rpc/auth_unix.c b/lib/libc/rpc/auth_unix.c
index c0d25483adf2..4d7a89b19112 100644
--- a/lib/libc/rpc/auth_unix.c
+++ b/lib/libc/rpc/auth_unix.c
@@ -94,10 +94,10 @@ struct audata {
AUTH *
authunix_create(machname, uid, gid, len, aup_gids)
char *machname;
- int uid;
- int gid;
+ uid_t uid;
+ gid_t gid;
int len;
- int *aup_gids;
+ gid_t *aup_gids;
{
struct authunix_parms aup;
char mymem[MAX_AUTH_BYTES];
@@ -207,9 +207,7 @@ authunix_create_default()
abort();
if (ngids > NGRPS)
ngids = NGRPS;
- /* XXX: interface problem; those should all have been unsigned */
- auth = authunix_create(machname, (int)uid, (int)gid, ngids,
- (int *)gids);
+ auth = authunix_create(machname, uid, gid, ngids, gids);
free(gids);
return (auth);
}
diff --git a/lib/libc/rpc/authunix_prot.c b/lib/libc/rpc/authunix_prot.c
index 7699e28effa7..dd84810c7cf5 100644
--- a/lib/libc/rpc/authunix_prot.c
+++ b/lib/libc/rpc/authunix_prot.c
@@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p)
XDR *xdrs;
struct authunix_parms *p;
{
- int **paup_gids;
+ gid_t **paup_gids;
assert(xdrs != NULL);
assert(p != NULL);
@@ -69,8 +69,8 @@ xdr_authunix_parms(xdrs, p)
if (xdr_u_long(xdrs, &(p->aup_time))
&& xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME)
- && xdr_int(xdrs, &(p->aup_uid))
- && xdr_int(xdrs, &(p->aup_gid))
+ && xdr_u_int(xdrs, &(p->aup_uid))
+ && xdr_u_int(xdrs, &(p->aup_gid))
&& xdr_array(xdrs, (char **) paup_gids,
&(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) {
return (TRUE);
diff --git a/lib/libc/rpc/rpc_soc.3 b/lib/libc/rpc/rpc_soc.3
index 8dedaa870046..a049a839b3ba 100644
--- a/lib/libc/rpc/rpc_soc.3
+++ b/lib/libc/rpc/rpc_soc.3
@@ -148,7 +148,7 @@ default authentication used by
.Ft "AUTH *"
.Xc
.It Xo
-.Fn authunix_create "char *host" "int uid" "int gid" "int len" "int *aup_gids"
+.Fn authunix_create "char *host" "uid_t uid" "gid_t gid" "int len" "gid_t *aup_gids"
.Xc
.Pp
Create and return an
diff --git a/lib/libc/rpc/svc_auth_unix.c b/lib/libc/rpc/svc_auth_unix.c
index 4d6f1021c814..f889d81fce5e 100644
--- a/lib/libc/rpc/svc_auth_unix.c
+++ b/lib/libc/rpc/svc_auth_unix.c
@@ -68,7 +68,7 @@ _svcauth_unix(rqst, msg)
struct area {
struct authunix_parms area_aup;
char area_machname[MAX_MACHINE_NAME+1];
- int area_gids[NGRPS];
+ gid_t area_gids[NGRPS];
} *area;
u_int auth_len;
size_t str_len, gid_len;
diff --git a/sys/rpc/auth.h b/sys/rpc/auth.h
index 6be08b625601..5ec85413d1c2 100644
--- a/sys/rpc/auth.h
+++ b/sys/rpc/auth.h
@@ -234,18 +234,17 @@ __END_DECLS
* System style authentication
* AUTH *authunix_create(machname, uid, gid, len, aup_gids)
* char *machname;
- * int uid;
- * int gid;
+ * uid_t uid;
+ * gid_t gid;
* int len;
- * int *aup_gids;
+ * gid_t *aup_gids;
*/
__BEGIN_DECLS
#ifdef _KERNEL
struct ucred;
extern AUTH *authunix_create(struct ucred *);
#else
-extern AUTH *authunix_create(char *, int, int, int,
- int *);
+extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *);
extern AUTH *authunix_create_default(void); /* takes no parameters */
#endif
extern AUTH *authnone_create(void); /* takes no parameters */