bcopy(saddr, &ncip->nci_id[len], len2);
len += len2;
if (len < ncip->nci_idlen) {
bcopy(saddr, &ncip->nci_id[len], len2);
len += len2;
if (len < ncip->nci_idlen) {
}
if (sinaddr && port && (inet_ntop(ss.ss_family, sinaddr, raddr, sizeof(raddr)) == raddr)) {
/* assemble r_addr = universal address (nmp->nm_nso->nso_so source IP addr + port) */
}
if (sinaddr && port && (inet_ntop(ss.ss_family, sinaddr, raddr, sizeof(raddr)) == raddr)) {
/* assemble r_addr = universal address (nmp->nm_nso->nso_so source IP addr + port) */
int
nfs4_secinfo_rpc(struct nfsmount *nmp, struct nfsreq_secinfo_args *siap, kauth_cred_t cred, uint32_t *sec, int *seccountp)
{
int
nfs4_secinfo_rpc(struct nfsmount *nmp, struct nfsreq_secinfo_args *siap, kauth_cred_t cred, uint32_t *sec, int *seccountp)
{
- int error = 0, status, nfsvers, numops, namelen, fhsize;
+ int error = 0, status, nfsvers, numops, fhsize;
{
int error = 0, numops, status;
uint32_t bitmap[NFS_ATTR_BITMAP_LEN];
{
int error = 0, numops, status;
uint32_t bitmap[NFS_ATTR_BITMAP_LEN];
struct nfsreq_secinfo_args si;
struct nfsm_chain nmreq, nmrep;
uint64_t xid;
struct nfsreq_secinfo_args si;
struct nfsm_chain nmreq, nmrep;
uint64_t xid;
nfsmout_if(error);
error = nfs4_parsefattr(&nmrep, NULL, NULL, NULL, NULL, nfslsp);
nfsmout:
nfsmout_if(error);
error = nfs4_parsefattr(&nmrep, NULL, NULL, NULL, NULL, nfslsp);
nfsmout:
otw_domain_len = strnlen(otw_nfs4domain, MAXPATHLEN);
otw_id_2_at_len = at - id + 1;
otw_domain_len = strnlen(otw_nfs4domain, MAXPATHLEN);
otw_id_2_at_len = at - id + 1;
/* first try to map nfs4 domain to dsnode for scoped lookups */
error = kauth_cred_nfs4domain2dsnode(otw_nfs4domain, dsnode);
if (!error) {
/* first try to map nfs4 domain to dsnode for scoped lookups */
error = kauth_cred_nfs4domain2dsnode(otw_nfs4domain, dsnode);
if (!error) {
if (nfs_idmap_ctrl & NFS_IDMAP_CTRL_LOG_SUCCESSFUL_MAPPINGS) {
printf("nfs4_id2guid: after domain mapping id is %s\n", id);
if (nfs_idmap_ctrl & NFS_IDMAP_CTRL_LOG_SUCCESSFUL_MAPPINGS) {
printf("nfs4_id2guid: after domain mapping id is %s\n", id);
error = kauth_cred_dsnode2nfs4domain(dsnode, nfs4domain);
if (!error) {
domain_len = strnlen(nfs4domain, MAXPATHLEN);
error = kauth_cred_dsnode2nfs4domain(dsnode, nfs4domain);
if (!error) {
domain_len = strnlen(nfs4domain, MAXPATHLEN);
nfs4_mapguid_log(error, "End of routine", guidp, isgroup, id1);
if (id1buf) {
nfs4_mapguid_log(error, "End of routine", guidp, isgroup, id1);
if (id1buf) {
attrbytes -= NFSX_UNSIGNED + nfsm_rndup(val);
}
if (NFS_BITMAP_ISSET(bitmap, NFS_FATTR_MODE)) {
attrbytes -= NFSX_UNSIGNED + nfsm_rndup(val);
}
if (NFS_BITMAP_ISSET(bitmap, NFS_FATTR_MODE)) {
- nfsm_chain_get_32(error, nmc, nvap->nva_mode);
+ nfsm_chain_get_32(error, nmc, val);
+ if (val > ALLPERMS) {
+ error = EBADRPC;
+ } else {
+ nvap->nva_mode = (mode_t)val;
+ }
attrbytes -= NFSX_UNSIGNED;
}
if (NFS_BITMAP_ISSET(bitmap, NFS_FATTR_NO_TRUNC)) {
attrbytes -= NFSX_UNSIGNED;
}
if (NFS_BITMAP_ISSET(bitmap, NFS_FATTR_NO_TRUNC)) {