ACC SHELL

Path : /usr/share/YaST2/include/security/
File Upload :
Current File : //usr/share/YaST2/include/security/widgets.ycp

/**
 * File:	include/security/widgets.ycp
 * Module:	Security configuration
 * Summary:	Security widgets definitions
 * Authors:	Michal Svec <msvec@suse.cz>
 *
 * $Id: widgets.ycp 57402 2009-06-02 20:40:08Z jsuchome $
 *
 * This file contains the definitions of all widgets used by the
 * security module. They are all in one map (function) called
 * WIDGETS.

<pre>

The WIDGETS format:
-------------------

map WIDGETS = $[
    "Item unique ID" : $[
	"Widget" : "ComboBox",
	"Label" : "Item Label",
	"Options" : [ "option1", "option2", ... ],
	"Value" : "option2"
    ],
  ...
];

The "Value" is the current value of this option and one from "Options".

Particular "Options" can be either <string> or [ <string>, <string> ]. In the
latter case, the first string is used as ID and the second is displayed. For
example: [ "option1", ["option2",_("Option2 translation")], ... ].

Possible "Widget" values so far: "ComboBox, CheckBox, TextEntry".

Implementation:
---------------

map2widget("ID")
- look up the "ID" in the "WIDGETS" map
- create the widget

widget2value("ID")
- query UI for the widget with `id(ID)
- return its current value

updatewidget("ID")
- look up the "ID" and change its "Value" to the "val"
- updates the WIDGETS map
- called after start and after each subdialog [OK]
- must check if the value is in "Options"! (TODO)

processinput()
- return true (OK) or false (abort, back, nil, help!, ...)

</pre>

 *
 */

/**
 * @return map all widgets
 */

{

textdomain "security";

/**
 * All widgets are here
 */
map WIDGETS = $[

    "CONSOLE_SHUTDOWN" : $[
	"Widget" : "ComboBox",
	/* ComboBox label */
	"Label" : _("&Interpretation of Ctrl + Alt + Del"),
	"Options" : [
	    /* ComboBox value */
	    ["ignore", _("Ignore")],
	    /* ComboBox value */
	    ["reboot", _("Reboot")],
	    /* ComboBox value */
	    ["halt", _("Halt")],
	],
	"Value" : "reboot"
    ],

    "CWD_IN_ROOT_PATH" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("&Current Directory in root's Path"),
	"Value" : "yes"
    ],

    "CWD_IN_USER_PATH" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("Curr&ent Directory in Path of Regular Users"),
	"Value" : "yes"
    ],

    "DISPLAYMANAGER_REMOTE_ACCESS" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("Allow Remote &Graphical Login"),
	"Value" : "no"
    ],

    "ENABLE_SYSRQ" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("Enable &Magic SysRq Keys"),
	"Value" : "no"
    ],

    "FAIL_DELAY" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("&Delay after Incorrect Login Attempt"),
	"Value" : "3"
    ],

    "GID_MAX" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("Maxim&um"),
	"Value" : "60000"
    ],

    "GID_MIN" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("M&inimum"),
	"Value" : "101"
    ],

    "DISPLAYMANAGER_SHUTDOWN" : $[
	"Widget" : "ComboBox",
	/* ComboBox label */
	"Label" : _("&Shutdown Behaviour of KDM Login Manager:"),
	"Options" : [
	    /* ComboBox value */
	    ["root",_("Only root")],
	    /* ComboBox value */
	    ["all",_("All Users")],
	    /* ComboBox value */
	    ["none",_("Nobody")],
	    /* ComboBox value */
//	    ["local",_("Local Users")],
	    /* ComboBox value */
	    ["auto",_("Automatic")],
	],
	"Value" : "all"
    ],

    "LASTLOG_ENAB" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("R&ecord Successful Login Attempts"),
	"Value" : "yes"
    ],

    "PASSWD_ENCRYPTION" : $[
	"Widget" : "ComboBox",
	/* ComboBox label */
	"Label" : _("P&assword Encryption Method"),
	/* ComboBox values */
	"Options" : [["des","DES"],["md5","MD5"],["blowfish","Blowfish"]],
	"Value" : "des",
	"Notify" : "yes",
    ],

    "PASSWD_USE_CRACKLIB" : $[
	"Widget" : "CheckBox",
	/* CheckBox label */
	"Label" : _("&Check New Passwords"),
	"Notify" : "yes",
	"Value" : "yes"
    ],

    "PASS_MAX_DAYS" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("Maxim&um"),
	"Value" : "99999"
    ],

    "PASSWD_REMEMBER_HISTORY" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("Numb&er of Passwords to Remember"),
	"MinValue" : 0,
	"MaxValue" : 400,
    ],

    "PASS_MIN_DAYS" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("M&inimum"),
	"Value" : "0"
    ],

    "PASS_MIN_LEN" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("&Minimum Acceptable Password Length"),
	"Value" : "5"
    ],

    "PASS_WARN_AGE" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("&Days before Password Expires Warning"),
	"Value" : "7"
    ],

    "PERMISSION_SECURITY" : $[
	"Widget" : "ComboBox",
	/* ComboBox label */
	"Label" : _("&File Permissions"),
	"Options" : [
	    /* ComboBox value */
	    ["easy",_("Easy")],
	    /* ComboBox value */
	    ["secure",_("Secure")],
	    /* ComboBox value */
	    ["paranoid",_("Paranoid")],
	],
	"Value" : "secure"
    ],

    "RUN_UPDATEDB_AS" : $[
	"Widget" : "ComboBox",
	/* ComboBox label */
	"Label" : _("&User Launching updatedb"),
	"Options" : [ "nobody", "root" ],
	"Value" : "nobody"
    ],

    "UID_MAX" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("Ma&ximum"),
	"Value" : "60000"
    ],

    "UID_MIN" : $[
	"Widget" : "IntField",
	/* IntField label */
	"Label" : _("&Minimum"),
	"Value" : "100"
    ],

/*
    "" : $[
	"Widget" : "",
	/* Widget label * /
	"Label" : _(""),
	/* Widget values * /
	"Options" : [["",_("")]],
	"Value" : ""
    ],

*/

];

/* EOF */
}

ACC SHELL 2018