James Moger
2013-09-30 699e71e76b15081baf746c6ce9c9144f7e5f1ff9
src/main/java/com/gitblit/PAMUserService.java
@@ -30,7 +30,7 @@
/**
 * Implementation of a PAM user service for Linux/Unix/MacOSX.
 *
 *
 * @author James Moger
 */
public class PAMUserService extends GitblitUserService {
@@ -38,7 +38,7 @@
    private final Logger logger = LoggerFactory.getLogger(PAMUserService.class);
    private IStoredSettings settings;
    public PAMUserService() {
        super();
    }
@@ -52,7 +52,7 @@
        serviceImpl = createUserService(realmFile);
        logger.info("PAM User Service backed by " + serviceImpl.toString());
        // Try to identify the passwd database
        String [] files = { "/etc/shadow", "/etc/master.passwd" };
      File passwdFile = null;
@@ -69,7 +69,7 @@
         logger.error("PAM User Service can not read passwd database {}! PAM authentications may fail!", passwdFile);
      }
    }
    @Override
    public boolean supportsCredentialChanges() {
        return false;
@@ -89,7 +89,7 @@
    public boolean supportsTeamMembershipChanges() {
        return true;
    }
    @Override
   protected AccountType getAccountType() {
      return AccountType.PAM;
@@ -101,7 +101,7 @@
         // local account, bypass PAM authentication
         return super.authenticate(username, password);
      }
      if (CLibrary.libc.getpwnam(username) == null) {
         logger.warn("Can not get PAM passwd for " + username);
         return null;
@@ -136,7 +136,7 @@
        // push the changes to the backing user service
        super.updateUserModel(user);
        return user;
    }
}