new SUP protocol additions / the shutdown stuff



I've just applied the ability to request shutdown, here are the relevant
commands.  They're a bit different from Jarno's version.  I wanted to get
some economy on number of commands per session as that's capped, and I wanted
more economy in how it worked internally.  Furthermore a dos is fixed from
Jarno's version since we must whack old connections when the display is
whacked itself.  Here are the relevant commands:

#define GDM_SUP_QUERY_LOGOUT_ACTION "QUERY_LOGOUT_ACTION" /* no arguments */
/* QUERY_LOGOUT_ACTION: Query which logout actions are possible
 * Only supported on connections that passed AUTH_LOCAL.
 * Supported since: 2.4.90.0
 * Answers:
 *   OK <action>;<action>;...
 *      Where action is one of HALT, REBOOT or SUSPEND.  An empty list
 *      can also be returned if no action is possible
 *   ERROR <err number> <english error description>
 *      0 = Not implemented
 *      100 = Not authenticanted
 *      200 = Too many messages
 *      999 = Unknown error
 */
#define GDM_SUP_SET_LOGOUT_ACTION "SET_LOGOUT_ACTION" /* <action> */
/* SET_LOGOUT_ACTION:  Tell the daemon to halt/reboot/suspend after slave
 * process exits. 
 * Only supported on connections that passed AUTH_LOCAL.
 * Supported since: 2.4.90.0
 * Arguments:  <action>
 *   NONE           Set exit action to 'none'
 *   HALT           Set exit action to 'halt'
 *   REBOOT         Set exit action to 'reboot'
 *   SUSPEND        Set exit action to 'suspend'
 *
 * Answers:
 *   OK
 *   ERROR <err number> <english error description>
 *      0 = Not implemented
 *      7 = Unknown logout action, or not available
 *      100 = Not authenticanted
 *      200 = Too many messages
 *      999 = Unknown error
 */

George

-- 
George <jirka 5z com>
   If God did not exist, it would be necessary to invent him.
                       -- Voltaire



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]