Subject: [nfsv4] auth_sys.h in nfs4_prot.x

From: "Sergey Klyushin" <[email-masked]>
Date: Tue, 13 May 2008 23:21:20 -0400

Hello,

There is %#include <rpc/auth_sys.h> in nfs4_prot.x.
This will include 
struct authsys_parms {
	uint_t	 aup_time;
	char	*aup_machname;
	uid_t	 aup_uid;
	gid_t	 aup_gid;
	uint_t	 aup_len;
	gid_t	*aup_gids;
};

Is it correct? Shouldn't the structure be in XDR format, I mean to
include length of aup_machname?
Something like  
struct authsys_parms_nfsv4 {
	uint_t	 aup_time;
	uint_t	 aup_len;
	char	*aup_machname;
	uid_t	 aup_uid;
	gid_t	 aup_gid;
	uint_t aup_len;
	gid_t	*aup_gids;
};

Thanks,
Sergey
_______________________________________________
nfsv4 mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/nfsv4

---

From: "Sergey Klyushin" <[email-masked]>
Date: Tue, 13 May 2008 23:25:20 -0400

OOPS. Copy/paste error. I mean
Something like  
struct authsys_parms_nfsv4 {
	uint_t	 aup_time;
	uint_t	 aup_machname_len;
	char	*aup_machname;
	uid_t	 aup_uid;
	gid_t	 aup_gid;
	uint_t aup_len;
	gid_t	*aup_gids;
};

-----Original Message-----
From: Sergey Klyushin 
Sent: Tuesday, May 13, 2008 8:21 PM
To: 'Mike Eisler'; [email-masked]
Subject: [nfsv4] auth_sys.h in nfs4_prot.x

Hello,

Thanks,
Sergey

---

From: "Mike Eisler" <[email-masked]>
Date: Tue, 13 May 2008 21:36:57 -0700 (PDT)

inline ....

> struct authsys_parms_nfsv4 {

The above is not XDR description language;  it is C.

> include length of aup_machname?

The % in front of a line in the .x file means to pass what follows
the % directly into the generated .c file without any XDR compiler
parsing. What gets #include'd will have to be written in C. The .x file
for NFSv4.1 includes the %#include for the authsys stuff in order to
allow the generated .c and .h files to compile. This how the NFSv4.1
editors test the .x file.

There is no need for a length for aup_machine, because the implementation
of auth_sys you are using on your system does not allow the machine name
to have an embedded nul character.

At any rate, authsys_parms is outside the scope of the NFSv4.1
specification.

-- 
Mike Eisler, Senior Technical Director, NetApp, 719 599 9026,
http://blogs.netapp.com/eislers_nfs_blog/