diff --git a/dosutils b/dosutils index 4563490..6d2d3f3 160000 --- a/dosutils +++ b/dosutils @@ -1 +1 @@ -Subproject commit 456349088ee152d9a73fd00ebe08ad6daf58702d +Subproject commit 6d2d3f367f0210d1b7373890bc36b25eb3b2faf7 diff --git a/src/nwconn.c b/src/nwconn.c index 62b252e..33a5337 100644 --- a/src/nwconn.c +++ b/src/nwconn.c @@ -1184,6 +1184,59 @@ static int handle_ncp_serv(void) } break; #endif + case 0x32 : { /* Get Object Effective Rights */ + /* + * Client32/NWCalls export: + * NWNCP22s50GetObjEffectRights + * + * Observed request layout from Client32/NCPWIN32: + * byte subfunction 0x32 + * dword object id (big endian) + * byte directory handle + * byte path length + * byte[] path + * + * Reply: + * word effective rights mask, low/high. + * + * mars_nwe's trustee engine currently computes effective + * rights for the active connection object. For the normal + * NWGetEffectiveRights/NWGetObjectEffectiveRights use from + * a logged-in client this object id is the current user. + */ + struct XDATA { + uint8 eff_rights[2]; /* LO-HI */ + } *xdata = (struct XDATA*) responsedata; + uint32 object_id = GET_BE32(p+1); + int dir_handle = (int)*(p+5); + int pathlen = (int)*(p+6); + uint8 *path = p+7; + int result; + + if (object_id && object_id != (uint32)act_obj_id) { + int save_act_obj_id = act_obj_id; + + /* + * Best effort for explicit-object callers. Group + * membership is still the connection's group list, which + * is correct for the usual current-user call and avoids + * changing bindery/group state in this low-level handler. + */ + act_obj_id = (int)object_id; + result = nw_get_eff_dir_rights(dir_handle, path, pathlen, 1); + act_obj_id = save_act_obj_id; + } else { + result = nw_get_eff_dir_rights(dir_handle, path, pathlen, 1); + } + + if (result > -1) { + U16_TO_16(result, xdata->eff_rights); + data_len = sizeof(struct XDATA); + } else completition = (uint8)(-result); + } + break; + + case 0x33 : { /* Get Extended Volume Information */ #if 0 @@ -1511,7 +1564,7 @@ static int handle_ncp_serv(void) uint8 *getsize=responsedata; int buffer_size = (int) (GET_BE16((uint8*)requestdata)); /* Der Novell-Client der PAM's Net/E-Ethernetkarte - für Atari ST/TT meldet ein Packetsize von 0 wenn + f�r Atari ST/TT meldet ein Packetsize von 0 wenn nwserv NACH dem Novell Client NET_S1.PRG gestartet wird. Da 0 in jedem Falle ein unsinniger Wert ist, wird rw_buffer_size nicht verwendet.