libnfsidmap
Subsystems (2)
Hi Bruce,
We are building nfs-utils 1.0.7 with libnfsidmap 0.20 to avoid a bug with userid mappings in libnfsidmap 0.12.
Then we tripped over nfs/<FQDN> principals not being resolved. Luckily I came across:
http://linux-nfs.org/pipermail/nfsv4/2006-June/004564.html
and realised that the code to handle nfs/<FQDN> principals is now in nfs-utils (utils/gssd/svcgssd_proc.c).
Are there any other known issues we might trip over as a result of using nfs-utils 1.0.7 with libnfsidmap 0.20?
Thanks,
#
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 9 lines · Harshula
Hi Bruce,
We are building nfs-utils 1.0.7 with libnfsidmap 0.20 to avoid a bug with userid mappings in libnfsidmap 0.12.
Then we tripped over nfs/<FQDN> principals not being resolved. Luckily I came across:
http://linux-nfs.org/pipermail/nfsv4/2006-June/004564.html
Quoted 8 lines
and realised that the code to handle nfs/<FQDN> principals is now in nfs-utils (
utils/gssd/svcgssd_proc.c).Are there any other known issues we might trip over as a result of using nfs-utils 1.0.7 with libnfsidmap 0.20?
Thanks,
#
Sorry for the troubles. I'm not Bruce, but AFAIK there aren't other issues, and it should always be safe to use the latest libraries.
K.C.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Hi Kevin,
Quoted 11 lines · Harshula
Hi Bruce,
We are building nfs-utils 1.0.7 with libnfsidmap 0.20 to avoid a bug with userid mappings in libnfsidmap 0.12.
Then we tripped over nfs/<FQDN> principals not being resolved. Luckily I came across:
http://linux-nfs.org/pipermail/nfsv4/2006-June/004564.htmland realised that the code to handle nfs/<FQDN> principals is now in nfs-utils (
utils/gssd/svcgssd_proc.c).
re: utils/gssd/svcgssd_proc.c:
-----------------------------------------------------
/*
* -ENOENT means there was no mapping, any other error
* value means there was an error trying to do the
* mapping.
* If there was no mapping, we send down the value -1
* to indicate that the anonuid/anongid for the export
* should be used.
*/
if (res == -ENOENT) {
cred->cr_uid = -1;
cred->cr_gid = -1;
cred->cr_ngroups = 0;
res = 0;
goto out_free;
}-----------------------------------------------------
What happens if the server has an export with the no_root_squash option?
I did a quick test with the above code snippet backported to nfs-utils 1.0.7 and found that an export with no_root_squash would still root_squash.
By doing:
-----------------------------------------------------
/*
* -ENOENT means there was no mapping, any other error
* value means there was an error trying to do the
* mapping.
*/
if (res == -ENOENT && strncmp(sname, "nfs/", 4) == 0) {
cred->cr_uid = 0;
cred->cr_gid = 0;
cred->cr_ngroups = 0;
res = 0;
goto out_free;
} -----------------------------------------------------
The root_squash/no_root_squash behaviour was as expected. Is there any problem with mapping to root UID iff the name has the "nfs/" prefix?
cya,
#
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 54 lines · Harshula
Hi Kevin,
Quoted 11 lines · Harshula
Hi Bruce,
We are building nfs-utils 1.0.7 with libnfsidmap 0.20 to avoid a bug with userid mappings in libnfsidmap 0.12.
Then we tripped over nfs/<FQDN> principals not being resolved. Luckily I came across:
http://linux-nfs.org/pipermail/nfsv4/2006-June/004564.htmland realised that the code to handle nfs/<FQDN> principals is now in nfs-utils (
utils/gssd/svcgssd_proc.c).re:
utils/gssd/svcgssd_proc.c:
-----------------------------------------------------
/*
*-ENOENTmeans there was no mapping, any other error
* value means there was an error trying to do the
* mapping.
* If there was no mapping, we send down the value -1
* to indicate that the anonuid/anongid for the export
* should be used.
*/if (res == -ENOENT) { cred->cr_uid = -1; cred->cr_gid = -1; cred->cr_ngroups = 0; res = 0; goto out_free; }-----------------------------------------------------
What happens if the server has an export with the
no_root_squashoption?I did a quick test with the above code snippet backported to nfs-utils 1.0.7 and found that an export with
no_root_squashwould stillroot_squash.By doing:
-----------------------------------------------------
/*
*-ENOENTmeans there was no mapping, any other error
* value means there was an error trying to do the
* mapping.
*/if (res == -ENOENT && strncmp(sname, "nfs/", 4) == 0) { cred->cr_uid = 0; cred->cr_gid = 0; cred->cr_ngroups = 0; res = 0; goto out_free; }
Quoted 7 lines
-----------------------------------------------------
The root_squash/no_root_squash behaviour was as expected. Is there any problem with mapping to root UID iff the name has the "nfs/" prefix?
cya,
#
1) this doesn't account for other cases where there is no mapping. This would seem more appropriate for what you are trying to do.
if (res == -ENOENT) {
if (strncmp(sname, "nfs/", 4) == 0) {
cred->cr_uid = 0;
cred->cr_gid = 0;
} else {
cred->cr_uid = -1;
cred->cr_gid = -1;
}
cred->cr_ngroups = 0;
res = 0;
goto out_free;
}2) a later version of nfs-utils allows root to use any credentials (does not use machine credentials for all accesses by root), which will defeat this check.
Otherwise, I think it is equivalent to the older version of nfs-utils
+ libnfsidmap.
K.C.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Hi Kevin,
Quoted 1 line · Kevin Coffman
1) this doesn't account for other cases where there is no mapping.
In practise, what are the "other cases" where a failed nfs4_gss_princ_to_ids() lookup needs to be mapped to 'nobody'?
Quoted 3 lines
2) a later version of nfs-utils allows root to use any credentials (does not use machine credentials for all accesses by root), which will defeat this check.
Thanks for the heads-up.
cya,
#
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 8 lines · Harshula
Hi Kevin,
Quoted 1 line · Kevin Coffman
1) this doesn't account for other cases where there is no mapping.
In practise, what are the "other cases" where a failed
nfs4_gss_princ_to_ids()lookup needs to be mapped to 'nobody'?
You have cross-realm Kerberos trusts set up. A user from a different Kerberos realm comes to your server and you have no local mapping for that user.
A new local user is created, but has not yet been placed in the mappings.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
A message that is not in the archive (sent off-list or not yet received): 4d569c330711150612n57d4f4deud19532569b2214d8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 8 lines · Kevin Coffman
Quoted 2 lines · Harshula
In practise, what are the "other cases" where a failed
nfs4_gss_princ_to_ids()lookup needs to be mapped to 'nobody'?You have cross-realm Kerberos trusts set up. A user from a different Kerberos realm comes to your server and you have no local mapping for that user.
Can the KDCs be setup to handle this case?
Quoted 1 line
A new local user is created, but has not yet been placed in the mappings.
This case should fail.
cya,
#
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued. Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs
A message that is not in the archive (sent off-list or not yet received): 1195644766.19850.252.camel-2WabGjdRN2LRvmHwrWB8BmjR7Gm6iKkz0E9HWUfgJXw@public.gmane.org
Quoted 11 lines · Harshula
Quoted 8 lines · Kevin Coffman
Quoted 2 lines · Harshula
In practise, what are the "other cases" where a failed
nfs4_gss_princ_to_ids()lookup needs to be mapped to 'nobody'?You have cross-realm Kerberos trusts set up. A user from a different Kerberos realm comes to your server and you have no local mapping for that user.
Can the KDCs be setup to handle this case?
If you are asking if the KDC can be configured to not give such users a ticket, the answer is no. It is up to the application (NFS in this case) to enforce authorization, Kerberos only does authentication. (This may be another case for a configuration option. See below.)
Quoted 3 lines
Quoted 1 line
A new local user is created, but has not yet been placed in the mappings.
This case should fail.
My opinion is that they have successfully authenticated, and should not be denied all access because there is no mapping. This should probably be a configurable option.
K.C.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued. Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs
A message that is not in the archive (sent off-list or not yet received): 4d569c330711210511x3f06562cp1a5886eaeaaea953-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi Kevin,
Quoted 11 lines · Kevin Coffman
Quoted 7 lines · Harshula
Quoted 3 lines · Kevin Coffman
You have cross-realm Kerberos trusts set up. A user from a different Kerberos realm comes to your server and you have no local mapping for that user.
Can the KDCs be setup to handle this case?
If you are asking if the KDC can be configured to not give such users a ticket, the answer is no.
No, I was referring to cross-realm authentication:
http://www.faqs.org/faqs/kerberos-faq/general/section-18.html
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
A new local user is created, but has not yet been placed in the mappings.
This case should fail.
My opinion is that they have successfully authenticated, and should not be denied all access because there is no mapping. This should probably be a configurable option.
If it is going to be configurable, I hope the default will be the 'secure' option of disallowing users without mappings. If a new local user is created and there is no mapping, then it's either a misconfiguration or intentional. We should not be catering for the misconfiguration.
cya,
#
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued. Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs