~ubuntu-branches/ubuntu/trusty/ldap-account-manager/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/modules/sambaDomain.inc

  • Committer: Package Import Robot
  • Author(s): Roland Gruber
  • Date: 2013-07-21 11:15:58 UTC
  • mfrom: (1.2.21)
  • Revision ID: package-import@ubuntu.com-20130721111558-ex49xgcpo71fh0xg
Tags: 4.2.1-2
* Apache 2.4 support
* Fix "transition towards Apache 2.4" 
  support conf-enabled (Closes: #669824)
* Fix "[ldap-account-manager] Can't install ldap-account-manager"
  support conf-enabled (Closes: #711778)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
2
/*
3
 
$Id: sambaDomain.inc 4540 2012-07-15 12:05:47Z gruberroland $
 
3
$Id: sambaDomain.inc 4903 2013-05-09 15:47:35Z gruberroland $
4
4
 
5
5
  This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
6
 
  Copyright (C) 2005 - 2012  Roland Gruber
 
6
  Copyright (C) 2005 - 2013  Roland Gruber
7
7
 
8
8
  This program is free software; you can redistribute it and/or modify
9
9
  it under the terms of the GNU General Public License as published by
631
631
        */
632
632
        function get_pdfEntries() {
633
633
                $return = array();
634
 
                if (sizeof($this->attributes['sambaDomainName']) > 0) {
635
 
                        $return['sambaDomain_domainName'][0] = '<block><key>' . _('Domain name') . '</key><value>' . implode(', ', $this->attributes['sambaDomainName']) . '</value></block>';
636
 
                }
637
 
                if (sizeof($this->attributes['sambaSID']) > 0) {
638
 
                        $return['sambaDomain_domainSID'][0] = '<block><key>' . _('Domain SID') . '</key><value>' . implode(', ', $this->attributes['sambaSID']) . '</value></block>';
639
 
                }
640
 
                if (sizeof($this->attributes['sambaNextRid']) > 0) {
641
 
                        $return['sambaDomain_nextRID'][0] = '<block><key>' . _('Next RID') . '</key><value>' . implode(', ', $this->attributes['sambaNextRid']) . '</value></block>';
642
 
                }
643
 
                if (sizeof($this->attributes['sambaNextUserRid']) > 0) {
644
 
                        $return['sambaDomain_nextUserRID'][0] = '<block><key>' . _('Next user RID') . '</key><value>' . implode(', ', $this->attributes['sambaNextUserRid']) . '</value></block>';
645
 
                }
646
 
                if (sizeof($this->attributes['sambaNextGroupRid']) > 0) {
647
 
                        $return['sambaDomain_nextGroupRID'][0] = '<block><key>' . _('Next group RID') . '</key><value>' . implode(', ', $this->attributes['sambaNextGroupRid']) . '</value></block>';
648
 
                }
649
 
                if (sizeof($this->attributes['sambaAlgorithmicRidBase']) > 0) {
650
 
                        $return['sambaDomain_RIDbase'][0] = '<block><key>' . _('RID base') . '</key><value>' . implode(', ', $this->attributes['sambaAlgorithmicRidBase']) . '</value></block>';
651
 
                }
652
 
                if (isset($this->attributes['sambaMinPwdLength'])) {
653
 
                        $return['sambaDomain_minPwdLength'][0] = '<block><key>' . _('Minimal password length') . '</key><value>' . implode(', ', $this->attributes['sambaMinPwdLength']) . '</value></block>';
654
 
                }
655
 
                if (isset($this->attributes['sambaPwdHistoryLength'])) {
656
 
                        $return['sambaDomain_pwdHistoryLength'][0] = '<block><key>' . _('Password history length') . '</key><value>' . implode(', ', $this->attributes['sambaPwdHistoryLength']) . '</value></block>';
657
 
                }
 
634
                $this->addSimplePDFField($return, 'domainName', _('Domain name'), 'sambaDomainName');
 
635
                $this->addSimplePDFField($return, 'domainSID', _('Domain SID'), 'sambaSID');
 
636
                $this->addSimplePDFField($return, 'nextRID', _('Next RID'), 'sambaNextRid');
 
637
                $this->addSimplePDFField($return, 'nextUserRID', _('Next user RID'), 'sambaNextUserRid');
 
638
                $this->addSimplePDFField($return, 'nextGroupRID', _('Next group RID'), 'sambaNextGroupRid');
 
639
                $this->addSimplePDFField($return, 'RIDbase', _('RID base'), 'sambaAlgorithmicRidBase');
 
640
                $this->addSimplePDFField($return, 'minPwdLength', _('Minimal password length'), 'sambaMinPwdLength');
 
641
                $this->addSimplePDFField($return, 'pwdHistoryLength', _('Password history length'), 'sambaPwdHistoryLength');
 
642
                $this->addSimplePDFField($return, 'lockoutThreshold', _('Lockout users after bad logon attempts'), 'sambaLockoutThreshold');
 
643
                $this->addSimplePDFField($return, 'minPwdAge', _('Minimum password age'), 'sambaMinPwdAge');
 
644
                $this->addSimplePDFField($return, 'maxPwdAge', _('Maximum password age'), 'sambaMaxPwdAge');
 
645
                $this->addSimplePDFField($return, 'lockoutDuration', _('Lockout duration'), 'sambaLockoutDuration');
 
646
                $this->addSimplePDFField($return, 'lockoutObservationWindow', _('Reset time after lockout'), 'sambaLockoutObservationWindow');
 
647
                
658
648
                if (isset($this->attributes['sambaLogonToChgPwd'])) {
659
649
                        $logonToChgPwd = _('Off');
660
650
                        if ($this->attributes['sambaPwdHistoryLength'][0] == 2) $logonToChgPwd = _('On');
670
660
                        if ($this->attributes['sambaRefuseMachinePwdChange'][0] == 0) $refuseMachinePwdChange = _('On');
671
661
                        $return['sambaDomain_refuseMachinePwdChange'][0] = '<block><key>' . _('Allow machine password changes') . '</key><value>' . $refuseMachinePwdChange . '</value></block>';
672
662
                }
673
 
                if (isset($this->attributes['sambaLockoutThreshold'][0])) {
674
 
                        $return['sambaDomain_lockoutThreshold'][0] = '<block><key>' . _('Lockout users after bad logon attempts') . '</key><value>' . $this->attributes['sambaLockoutThreshold'][0] . '</value></block>';
675
 
                }
676
 
                if (isset($this->attributes['sambaMinPwdAge'])) {
677
 
                        $return['sambaDomain_minPwdAge'][0] = '<block><key>' . _('Minimum password age') . '</key><value>' . implode(', ', $this->attributes['sambaMinPwdAge']) . '</value></block>';
678
 
                }
679
 
                if (isset($this->attributes['sambaMaxPwdAge'])) {
680
 
                        $return['sambaDomain_maxPwdAge'][0] = '<block><key>' . _('Maximum password age') . '</key><value>' . implode(', ', $this->attributes['sambaMaxPwdAge']) . '</value></block>';
681
 
                }
682
 
                if (isset($this->attributes['sambaLockoutDuration'])) {
683
 
                        $return['sambaDomain_lockoutDuration'][0] = '<block><key>' . _('Lockout duration') . '</key><value>' . implode(', ', $this->attributes['sambaLockoutDuration']) . '</value></block>';
684
 
                }
685
 
                if (isset($this->attributes['sambaLockoutObservationWindow'])) {
686
 
                        $return['sambaDomain_lockoutObservationWindow'][0] = '<block><key>' . _('Reset time after lockout') . '</key><value>' . implode(', ', $this->attributes['sambaLockoutObservationWindow']) . '</value></block>';
687
 
                }
688
663
                return $return;
689
664
        }
690
665