Author: jsuchome Date: Fri Oct 5 15:57:05 2007 New Revision: 41268 URL: http://svn.opensuse.org/viewcvs/yast?rev=41268&view=rev Log: do not use Pam API, pam_thinkfinger cares about the PAM configuration Modified: branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/FingerprintReader.ycp branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/UsersPluginFingerprintReader.pm branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/dialogs.ycp Modified: branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/FingerprintReader.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/FingerprintReader.ycp?rev=41268&r1=41267&r2=41268&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/FingerprintReader.ycp (original) +++ branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/FingerprintReader.ycp Fri Oct 5 15:57:05 2007 @@ -37,7 +37,7 @@ import "Arch"; import "FileUtils"; -import "Pam"; +import "Package"; import "Popup"; import "Progress"; import "Report"; @@ -110,7 +110,7 @@ return false; } - use_pam = Pam::Enabled ("thinkfinger"); + use_pam = Package::Installed ("pam_thinkfinger"); modified = false; return true; @@ -132,14 +132,14 @@ sleep(sl); // We do not set help text here, because it was set outside - Progress::New(caption, " ", 2, [ + Progress::New(caption, " ", 1, [ // Progress stage - _("Write the PAM settings"), +// _("Write the PAM settings"), // Progress stage _("Import fingerprint files"), ], [ // Progress step - _("Writing the PAM settings..."), +// _("Writing the PAM settings..."), // Progress step _("Importing fingerprint files..."), // Progress finished @@ -148,6 +148,7 @@ "" ); + /* no PAM writing on SLE10, everything is done by pam_thinkfinger package Progress::NextStage(); boolean pam_ret = use_pam ? @@ -157,6 +158,7 @@ Report::Error (_("Cannot write PAM settings.")); sleep(sl); + */ Progress::NextStage(); if (use_pam && import_dir != "") @@ -213,7 +215,7 @@ global list Summary() { // summary header - string summary = Summary::AddHeader(summary, _("PAM Login")); + string summary = Summary::AddHeader("", _("PAM Login")); summary = Summary::AddLine (summary, (use_pam) ? // summary item Modified: branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/UsersPluginFingerprintReader.pm URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/UsersPluginFingerprintReader.pm?rev=41268&r1=41267&r2=41268&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/UsersPluginFingerprintReader.pm (original) +++ branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/UsersPluginFingerprintReader.pm Fri Oct 5 15:57:05 2007 @@ -22,7 +22,7 @@ YaST::YCP::Import ("Directory"); YaST::YCP::Import ("FileUtils"); YaST::YCP::Import ("FingerprintReader"); -YaST::YCP::Import ("Pam"); +YaST::YCP::Import ("Package"); YaST::YCP::Import ("SCR"); YaST::YCP::Import ("Users"); @@ -65,7 +65,8 @@ # helper, check if Fingerprint Reader was already configured sub fingerprint_reader_configured { - return Pam->Enabled ("thinkfinger"); + # in SLE10SP1, pam_thinkfinger package handles the PAM stuff itself + return Package->Installed ("pam_thinkfinger"); } # helper function: check if Fingerprint Reader (the device) is available @@ -206,7 +207,6 @@ # Is it possible to remove this plugin from user? BEGIN { $TYPEINFO{PluginRemovable} = ["function", "boolean", "any", "any"];} sub PluginRemovable { - # doesn't have sense to remove return YaST::YCP::Boolean (1); } Modified: branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/dialogs.ycp?rev=41268&r1=41267&r2=41268&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/dialogs.ycp (original) +++ branches/SuSE-SLE-10-SP1-Branch/fingerprint-reader/src/dialogs.ycp Fri Oct 5 15:57:05 2007 @@ -104,7 +104,7 @@ `VSpacing (), `HBox ( // textentry label - `TextEntry (`id(`import_dir),_("Directory with fingerprint files")), + `TextEntry (`id(`import_dir),_("&Directory with fingerprint files")), `VBox ( `Label (""), `PushButton (`id (`browse), Label::BrowseButton ()) @@ -170,6 +170,16 @@ UI::ChangeWidget (`id (`browse), `Enabled, use_pam); continue; } + if (!use_pam && + !Package::RemoveAll (FingerprintReader::UpdatedArchPackages ( + FingerprintReader::required_packages))) + { + use_pam = true; + UI::ChangeWidget (`id (`rd), `Value, `pamyes); + UI::ChangeWidget (`id (`import_dir), `Enabled, use_pam); + UI::ChangeWidget (`id (`browse), `Enabled, use_pam); + continue; + } if (use_pam != FingerprintReader::use_pam || (use_pam && import_dir != "")) { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org