From 67a08738a5f688f1050b83572a717c727e7d29c3 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Wed, 9 Mar 2011 20:53:33 +0100 Subject: KCL und BootMenuFilter --- application/forms/BootmenuEntriesEdit.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'application/forms/BootmenuEntriesEdit.php') diff --git a/application/forms/BootmenuEntriesEdit.php b/application/forms/BootmenuEntriesEdit.php index 7fd97fe..8eb4b95 100644 --- a/application/forms/BootmenuEntriesEdit.php +++ b/application/forms/BootmenuEntriesEdit.php @@ -24,6 +24,12 @@ class Application_Form_BootmenuEntriesEdit extends Zend_Form public function init() { + + if(!isset($_POST['bootosID'])){ + $firstbootos = array_slice($this->bootoslist,0,1); + $_POST['bootosID'] = $firstbootos[0]->getID(); + } + $this->setName("BootMenuEntryAdd"); $this->setMethod('post'); @@ -37,7 +43,9 @@ class Application_Form_BootmenuEntriesEdit extends Zend_Form )); $bootosfield = $this->createElement('select','bootosID'); - $bootosfield ->setLabel('BootOs:'); + $bootosfield->setLabel('BootOs:'); + $bootosfield->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();"); + if(count($this->bootoslist)>0){ foreach($this->bootoslist as $bootos => $b){ @@ -56,6 +64,7 @@ class Application_Form_BootmenuEntriesEdit extends Zend_Form 'cols' => 50, 'rows' => 5, 'label' => 'KCL:', + 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl() )); $configfield = $this->createElement('select','configID'); -- cgit v1.2.3-55-g7522 From 98b708fd4b640cccff3e24a3d08edbd673a9f8e9 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Thu, 10 Mar 2011 10:56:48 +0100 Subject: default kcl und config hinzugefuegt --- application/controllers/BootmenuController.php | 12 ++++++++---- application/forms/BootmenuEntriesAdd.php | 9 ++++++--- application/forms/BootmenuEntriesEdit.php | 8 ++++++-- 3 files changed, 20 insertions(+), 9 deletions(-) (limited to 'application/forms/BootmenuEntriesEdit.php') diff --git a/application/controllers/BootmenuController.php b/application/controllers/BootmenuController.php index 26dba2d..e2f4a2b 100644 --- a/application/controllers/BootmenuController.php +++ b/application/controllers/BootmenuController.php @@ -60,6 +60,7 @@ class BootmenuController extends Zend_Controller_Action $addbootmenuentryForm = new Application_Form_BootmenuEntriesAdd(array('bootoslist'=>$bootosmapper->fetchAll(), 'maxorder'=> $this->_request->getParam('maxorder'), 'configlist'=>$configmapper->fetchAll())); $addbootmenuentryForm->populate(array('order' => $this->_request->getParam('maxorder'))); unset($_POST['kcl']); + unset($_POST['configID']); $addbootmenuentryForm->populate($_POST); } else { @@ -154,6 +155,7 @@ class BootmenuController extends Zend_Controller_Action $bootmenu->setID($bootmenuID); try { + $bootmenumapper->save($bootmenu); }catch(Zend_Exception $e) { @@ -187,12 +189,14 @@ class BootmenuController extends Zend_Controller_Action $bootmenuentrymapper->find($bootmenuentryID, $bootmenuentry); $editbootmenuentryForm = new Application_Form_BootmenuEntriesEdit(array('bootoslist'=>$bootosmapper->fetchAll(), 'maxorder' => $this->_request->getParam('maxorder'), 'configlist'=>$configmapper->fetchAll())); - if(!isset($_POST['kcl'])) + if(!isset($_POST['kcl'])){ $editbootmenuentryForm->populate($bootmenuentry->toArray()); - else - unset($_POST['bootmenuID']); + } + else{ + unset($_POST['kcl']); + unset($_POST['configID']); $editbootmenuentryForm->populate($_POST); - + } } }else{ $editbootmenuentryForm = new Application_Form_BootmenuEntriesEdit(array('bootoslist'=>$bootosmapper->fetchAll(), 'maxorder'=> $this->_request->getParam('maxorder'), 'configlist'=>$configmapper->fetchAll()),$_POST); diff --git a/application/forms/BootmenuEntriesAdd.php b/application/forms/BootmenuEntriesAdd.php index 2731f60..4aea750 100644 --- a/application/forms/BootmenuEntriesAdd.php +++ b/application/forms/BootmenuEntriesAdd.php @@ -45,7 +45,6 @@ class Application_Form_BootmenuEntriesAdd extends Zend_Form $bootosfield ->setLabel('BootOs:'); $bootosfield->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();"); - if(count($this->bootoslist)>0){ foreach($this->bootoslist as $bootos => $b){ $bootosfield->addMultiOption($b->getID(), $b->getTitle()); @@ -68,14 +67,18 @@ class Application_Form_BootmenuEntriesAdd extends Zend_Form )); + $defaultconfigid = $this->bootoslist[$_POST['bootosID']]->getConfigID(); $configfield = $this->createElement('select','configID'); - $configfield ->setLabel('Config:'); + $configfield->setLabel('Config:'); + $configfield->addMultiOption($defaultconfigid, 'default'); if(count($this->configlist)>0){ foreach($this->configlist as $config => $c){ - $configfield->addMultiOption($c->getID(), $c->getTitle()); + if($c->getID() != $defaultconfigid) + $configfield->addMultiOption($c->getID(), $c->getTitle()); } } + $configfield->setRegisterInArrayValidator(false); $this->addElement($configfield); diff --git a/application/forms/BootmenuEntriesEdit.php b/application/forms/BootmenuEntriesEdit.php index 8eb4b95..1548129 100644 --- a/application/forms/BootmenuEntriesEdit.php +++ b/application/forms/BootmenuEntriesEdit.php @@ -67,12 +67,16 @@ class Application_Form_BootmenuEntriesEdit extends Zend_Form 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl() )); + $defaultconfigid = $this->bootoslist[$_POST['bootosID']]->getConfigID(); $configfield = $this->createElement('select','configID'); - $configfield ->setLabel('Config:'); + $configfield->setLabel('Config:'); + $configfield->addMultiOption($defaultconfigid, 'default'); + if(count($this->configlist)>0){ foreach($this->configlist as $config => $c){ - $configfield->addMultiOption($c->getID(), $c->getTitle()); + if($c->getID() != $defaultconfigid) + $configfield->addMultiOption($c->getID(), $c->getTitle()); } } $configfield->setRegisterInArrayValidator(false); -- cgit v1.2.3-55-g7522 From ae7d2ce03b014db0047194199d5962b77f9b1a0a Mon Sep 17 00:00:00 2001 From: michael pereira Date: Thu, 10 Mar 2011 21:19:06 +0100 Subject: postinit.local angepasst, extrahiert aus der kernelcommandline die configid --- application/forms/BootmenuEntriesAdd.php | 2 +- application/forms/BootmenuEntriesEdit.php | 2 +- application/forms/BootosCreate.php | 2 +- application/forms/BootosEdit.php | 2 +- resources/bootos/1/initramfs/initramfs | Bin 6020724 -> 6077246 bytes resources/config/1/config/etc/nsswitch.conf | 29 +++++++++---------- resources/config/1/config/etc/pam.d/common-account | 30 ++++++++++++++++---- resources/config/1/config/etc/pam.d/common-auth | 22 +++++++++++---- resources/config/1/config/etc/pam.d/common-session | 31 +++++++++++++++++---- 9 files changed, 84 insertions(+), 36 deletions(-) (limited to 'application/forms/BootmenuEntriesEdit.php') diff --git a/application/forms/BootmenuEntriesAdd.php b/application/forms/BootmenuEntriesAdd.php index 4aea750..6981619 100644 --- a/application/forms/BootmenuEntriesAdd.php +++ b/application/forms/BootmenuEntriesAdd.php @@ -59,7 +59,7 @@ class Application_Form_BootmenuEntriesAdd extends Zend_Form 'validators' => array( array('StringLength', false, array(0, 50)), ), - 'required' => true, + 'required' => false, 'cols' => 50, 'rows' => 5, 'label' => 'KCL:', diff --git a/application/forms/BootmenuEntriesEdit.php b/application/forms/BootmenuEntriesEdit.php index 1548129..6dc1aab 100644 --- a/application/forms/BootmenuEntriesEdit.php +++ b/application/forms/BootmenuEntriesEdit.php @@ -60,7 +60,7 @@ class Application_Form_BootmenuEntriesEdit extends Zend_Form 'validators' => array( array('StringLength', false, array(0, 50)), ), - 'required' => true, + 'required' => false, 'cols' => 50, 'rows' => 5, 'label' => 'KCL:', diff --git a/application/forms/BootosCreate.php b/application/forms/BootosCreate.php index a6d74c6..8f699ce 100644 --- a/application/forms/BootosCreate.php +++ b/application/forms/BootosCreate.php @@ -78,7 +78,7 @@ class Application_Form_BootosCreate extends Zend_Form 'validators' => array( array('StringLength', false, array(0, 50)), ), - 'required' => true, + 'required' => false, 'rows' => 5, 'cols' => 50, 'label' => 'Default-KCL:', diff --git a/application/forms/BootosEdit.php b/application/forms/BootosEdit.php index 572e712..641429d 100644 --- a/application/forms/BootosEdit.php +++ b/application/forms/BootosEdit.php @@ -86,7 +86,7 @@ class Application_Form_BootosEdit extends Zend_Form 'validators' => array( array('StringLength', false, array(0, 50)), ), - 'required' => true, + 'required' => false, 'rows' => 5, 'cols' => 50, 'label' => 'Default-KCL:', diff --git a/resources/bootos/1/initramfs/initramfs b/resources/bootos/1/initramfs/initramfs index e7bfa9e..20fc809 100644 Binary files a/resources/bootos/1/initramfs/initramfs and b/resources/bootos/1/initramfs/initramfs differ diff --git a/resources/config/1/config/etc/nsswitch.conf b/resources/config/1/config/etc/nsswitch.conf index 7251f2c..6886def 100755 --- a/resources/config/1/config/etc/nsswitch.conf +++ b/resources/config/1/config/etc/nsswitch.conf @@ -1,22 +1,19 @@ -# file copied from configuration package (rootfs/etc/nsswitch.conf) -# # /etc/nsswitch.conf # +# Example configuration of GNU Name Service Switch functionality. +# If you have the `glibc-doc-reference' and `info' packages installed, try: +# `info libc "Name Service Switch"' for information about this file. -passwd: files ldap -group: files ldap +passwd: compat +group: compat +shadow: compat -hosts: files dns -networks: files dns +hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 +networks: files -services: files -protocols: files -rpc: files -ethers: files -netmasks: files -netgroup: files -publickey: files +protocols: db files +services: db files +ethers: db files +rpc: db files -bootparams: files -automount: files nis -aliases: files +netgroup: nis diff --git a/resources/config/1/config/etc/pam.d/common-account b/resources/config/1/config/etc/pam.d/common-account index 3caf0dd..316b173 100755 --- a/resources/config/1/config/etc/pam.d/common-account +++ b/resources/config/1/config/etc/pam.d/common-account @@ -1,5 +1,25 @@ -# file copied from configuration package (rootfs/etc/pam.d/common-account) -account requisite pam_unix.so -account [success=ok new_authtok_reqd=ok ignore=ignore default=bad user_unknown=ignore] pam_krb5.so use_first_pass -account sufficient pam_localuser.so -account required pam_ldap.so use_first_pass +# +# /etc/pam.d/common-account - authorization settings common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of the authorization modules that define +# the central access policy for use on the system. The default is to +# only deny service to users whose accounts are expired in /etc/shadow. +# +# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. +# To take advantage of this, it is recommended that you configure any +# local modules either before or after the default block, and use +# pam-auth-update to manage selection of other modules. See +# pam-auth-update(8) for details. +# + +# here are the per-package modules (the "Primary" block) +account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so +# here's the fallback if no module succeeds +account requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +account required pam_permit.so +# and here are more per-package modules (the "Additional" block) +# end of pam-auth-update config diff --git a/resources/config/1/config/etc/pam.d/common-auth b/resources/config/1/config/etc/pam.d/common-auth index 5b8c00b..5facfa2 100755 --- a/resources/config/1/config/etc/pam.d/common-auth +++ b/resources/config/1/config/etc/pam.d/common-auth @@ -1,4 +1,3 @@ -# file copied from configuration package (rootfs/etc/pam.d/common-auth) # # /etc/pam.d/common-auth - authentication settings common to all services # @@ -8,8 +7,19 @@ # (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the # traditional Unix authentication mechanisms. # -auth required pam_env.so -auth optional pam_group.so -auth sufficient pam_unix.so -auth sufficient pam_krb5.so use_first_pass -auth required pam_ldap.so use_first_pass +# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. +# To take advantage of this, it is recommended that you configure any +# local modules either before or after the default block, and use +# pam-auth-update to manage selection of other modules. See +# pam-auth-update(8) for details. + +# here are the per-package modules (the "Primary" block) +auth [success=1 default=ignore] pam_unix.so nullok_secure +# here's the fallback if no module succeeds +auth requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +auth required pam_permit.so +# and here are more per-package modules (the "Additional" block) +# end of pam-auth-update config diff --git a/resources/config/1/config/etc/pam.d/common-session b/resources/config/1/config/etc/pam.d/common-session index aec02b8..464d41d 100755 --- a/resources/config/1/config/etc/pam.d/common-session +++ b/resources/config/1/config/etc/pam.d/common-session @@ -1,5 +1,26 @@ -# file copied from configuration package (rootfs/etc/pam.d/common-session) -session required pam_limits.so -session required pam_unix.so -session optional pam_krb5.so -session optional pam_umask.so +# +# /etc/pam.d/common-session - session-related modules common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define tasks to be performed +# at the start and end of sessions of *any* kind (both interactive and +# non-interactive). +# +# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. +# To take advantage of this, it is recommended that you configure any +# local modules either before or after the default block, and use +# pam-auth-update to manage selection of other modules. See +# pam-auth-update(8) for details. + +# here are the per-package modules (the "Primary" block) +session [default=1] pam_permit.so +# here's the fallback if no module succeeds +session requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +session required pam_permit.so +# and here are more per-package modules (the "Additional" block) +session required pam_unix.so +session optional pam_ck_connector.so nox11 +# end of pam-auth-update config -- cgit v1.2.3-55-g7522