Package jcifs.smb

Examples of jcifs.smb.SID.toDisplayString()


   * @param sidType
   */
  private SID createSID(String domainName, String displayString, int sidType) {
    SID sid = createMock(SID.class);
    expect(sid.getDomainName()).andStubReturn(domainName);
    expect(sid.toDisplayString()).andStubReturn(displayString);
    expect(sid.getType()).andStubReturn(sidType);
    replay(sid);
    return sid;
  }

View Full Code Here


   */
  private ACE createACE(String userOrGroupName, boolean isUser, boolean isDeny) {
    //TODO : Add enums instead of booleans to avoid comments in the calls.
    ACE ace = createMock(ACE.class);
    SID sid = createMock(SID.class);
    expect(sid.toDisplayString()).andReturn(userOrGroupName);
    expectLastCall().anyTimes();
    if (isUser) {
      expect(sid.getType()).andReturn(SID.SID_TYPE_USER);
    } else {
        expect(sid.getType()).andReturn(SID.SID_TYPE_DOM_GRP);
View Full Code Here

   */
  protected void addAceToSet(Set<Principal> users, Set<Principal> groups,
      ACE finalAce) {
    SID sid = finalAce.getSID();
    int sidType = sid.getType();
    String aclEntry = sid.toDisplayString();
    int ix = aclEntry.indexOf('\\');
    if (ix > 0) {
      String domain = aclEntry.substring(0, ix);
      String userOrGroup = aclEntry.substring(ix + 1);
      if (sidType == SID.SID_TYPE_USER) {
View Full Code Here

        LOGGER.log(Level.FINEST, "Filtering BUILTIN ACE {0} for file {1}",
                   new Object[] { ace, file });
        return;
      }
    }
    String aclEntry = sid.toDisplayString();
    if (sid.toString().equals(aclEntry)) {
      LOGGER.log(Level.FINEST, "Filtering unresolved ACE {0} for file {1}",
                 new Object[] { ace, file });
      return;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.