mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-08 09:20:16 +01:00
2007-06-14 Havoc Pennington <hp@redhat.com>
* dbus/dbus-sysdeps-unix.c (_dbus_credentials_parse_and_add_user): delete this function since it was effectively the same as _dbus_credentials_add_from_username()
This commit is contained in:
parent
48c6f1472d
commit
e7c0d21779
5 changed files with 19 additions and 35 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2007-06-14 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* dbus/dbus-sysdeps-unix.c (_dbus_credentials_parse_and_add_user):
|
||||
delete this function since it was effectively the same as
|
||||
_dbus_credentials_add_from_username()
|
||||
|
||||
2007-06-14 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* dbus/dbus-auth.c: adapt to keyring changes
|
||||
|
|
|
|||
|
|
@ -534,7 +534,7 @@ sha1_handle_first_client_response (DBusAuth *auth,
|
|||
}
|
||||
}
|
||||
|
||||
if (!_dbus_credentials_add_from_username (auth->desired_identity, data))
|
||||
if (!_dbus_credentials_add_from_user (auth->desired_identity, data))
|
||||
{
|
||||
_dbus_verbose ("%s: Did not get a valid username from client\n",
|
||||
DBUS_AUTH_NAME (auth));
|
||||
|
|
@ -1062,8 +1062,8 @@ handle_server_data_external_mech (DBusAuth *auth,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!_dbus_credentials_parse_and_add_user(auth->desired_identity,
|
||||
&auth->identity))
|
||||
if (!_dbus_credentials_add_from_user (auth->desired_identity,
|
||||
&auth->identity))
|
||||
{
|
||||
_dbus_verbose ("%s: could not get credentials from uid string\n",
|
||||
DBUS_AUTH_NAME (auth));
|
||||
|
|
|
|||
|
|
@ -1505,33 +1505,6 @@ _dbus_credentials_add_from_current_process (DBusCredentials *credentials)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a desired identity provided from a client in the auth protocol.
|
||||
* On UNIX this means parsing a UID, on Windows probably parsing an
|
||||
* SID string.
|
||||
*
|
||||
* @todo this is broken because it treats OOM and parse error
|
||||
* the same way. Needs a #DBusError.
|
||||
*
|
||||
* @param credentials the credentials to add what we parse to
|
||||
* @param desired_identity the string to parse
|
||||
* @returns #TRUE if we successfully parsed something
|
||||
*/
|
||||
dbus_bool_t
|
||||
_dbus_credentials_parse_and_add_user (DBusCredentials *credentials,
|
||||
const DBusString *desired_identity)
|
||||
{
|
||||
dbus_uid_t uid;
|
||||
|
||||
if (!_dbus_parse_uid (desired_identity, &uid))
|
||||
return FALSE;
|
||||
|
||||
if (!_dbus_credentials_add_unix_uid (credentials, uid))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append to the string the identity we would like to have when we
|
||||
* authenticate, on UNIX this is the current process UID and on
|
||||
|
|
|
|||
|
|
@ -162,11 +162,9 @@ dbus_bool_t _dbus_read_credentials_socket (int client_fd,
|
|||
dbus_bool_t _dbus_send_credentials_socket (int server_fd,
|
||||
DBusError *error);
|
||||
|
||||
dbus_bool_t _dbus_credentials_add_from_username (DBusCredentials *credentials,
|
||||
dbus_bool_t _dbus_credentials_add_from_user (DBusCredentials *credentials,
|
||||
const DBusString *username);
|
||||
dbus_bool_t _dbus_credentials_add_from_current_process (DBusCredentials *credentials);
|
||||
dbus_bool_t _dbus_credentials_parse_and_add_user (DBusCredentials *credentials,
|
||||
const DBusString *desired_identity);
|
||||
dbus_bool_t _dbus_append_user_from_current_process (DBusString *str);
|
||||
|
||||
dbus_bool_t _dbus_parse_unix_user_from_config (const DBusString *username,
|
||||
|
|
|
|||
|
|
@ -477,13 +477,20 @@ _dbus_homedir_from_uid (dbus_uid_t uid,
|
|||
/**
|
||||
* Adds the credentials corresponding to the given username.
|
||||
*
|
||||
* Used among other purposes to parses a desired identity provided
|
||||
* from a client in the auth protocol. On UNIX this means parsing a
|
||||
* UID, on Windows probably parsing an SID string.
|
||||
*
|
||||
* @todo this is broken because it treats OOM and parse error
|
||||
* the same way. Needs a #DBusError.
|
||||
*
|
||||
* @param credentials credentials to fill in
|
||||
* @param username the username
|
||||
* @returns #TRUE if the username existed and we got some credentials
|
||||
*/
|
||||
dbus_bool_t
|
||||
_dbus_credentials_add_from_username (DBusCredentials *credentials,
|
||||
const DBusString *username)
|
||||
_dbus_credentials_add_from_user (DBusCredentials *credentials,
|
||||
const DBusString *username)
|
||||
{
|
||||
DBusUserDatabase *db;
|
||||
const DBusUserInfo *info;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue