Fri, 12 Feb 2021 23:47:53 -0600
Fix SILC compilation
* Move `_purple_fstat` to silc and rename to `silcpurple_fstat`
* Replace unknown `g_fchmod` with `fchmod`
* Fix `PurpleProtocol*` prototypes
* Derive `SilcPurpleXfer` from `PurpleXfer`
Testing Done:
Compile.
Bugs closed: PIDGIN-17436
Reviewed at https://reviews.imfreedom.org/r/481/
| 8849 | 1 | /* |
| 2 | ||
| 15884 | 3 | silcpurple.h |
| 8849 | 4 | |
| 5 | Author: Pekka Riikonen <priikone@silcnet.org> | |
| 6 | ||
|
17675
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
7 | Copyright (C) 2004 - 2007 Pekka Riikonen |
| 8849 | 8 | |
| 9 | This program is free software; you can redistribute it and/or modify | |
| 10 | it under the terms of the GNU General Public License as published by | |
| 11 | the Free Software Foundation; version 2 of the License. | |
| 12 | ||
| 13 | This program is distributed in the hope that it will be useful, | |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | GNU General Public License for more details. | |
| 17 | ||
| 18 | */ | |
| 19 | ||
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39556
diff
changeset
|
20 | #ifndef PURPLE_SILC_SILCPURPLE_H |
|
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39556
diff
changeset
|
21 | #define PURPLE_SILC_SILCPURPLE_H |
| 8849 | 22 | |
|
37418
28302ab00d1a
Include gmodule.h in each protocol's eponymous header because they all
Michael McConville <mmcco@mykolab.com>
parents:
37148
diff
changeset
|
23 | #include <gmodule.h> |
|
28302ab00d1a
Include gmodule.h in each protocol's eponymous header because they all
Michael McConville <mmcco@mykolab.com>
parents:
37148
diff
changeset
|
24 | |
|
40769
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
25 | #include <silc.h> |
|
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
26 | #include <silcclient.h> |
|
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
27 | |
| 15884 | 28 | /* Purple includes */ |
|
40358
e6fe6fc1f516
move all protocols, purple plugins, and purple tests to use purple.h instead of including files individually
Gary Kramlich <grim@reaperworld.com>
parents:
40115
diff
changeset
|
29 | #include <purple.h> |
| 8849 | 30 | |
|
36595
d013a99e6d94
Refactored silc to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36543
diff
changeset
|
31 | #define SILCPURPLE_TYPE_PROTOCOL (silcpurple_protocol_get_type()) |
|
36660
ddb40f691d20
Renamed certain protocol type names to better suit the naming convention used by the protocol
Ankit Vani <a@nevitus.org>
parents:
36638
diff
changeset
|
32 | #define SILCPURPLE_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SILCPURPLE_TYPE_PROTOCOL, SilcProtocol)) |
|
ddb40f691d20
Renamed certain protocol type names to better suit the naming convention used by the protocol
Ankit Vani <a@nevitus.org>
parents:
36638
diff
changeset
|
33 | #define SILCPURPLE_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SILCPURPLE_TYPE_PROTOCOL, SilcProtocolClass)) |
|
36595
d013a99e6d94
Refactored silc to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36543
diff
changeset
|
34 | #define SILCPURPLE_IS_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SILCPURPLE_TYPE_PROTOCOL)) |
|
d013a99e6d94
Refactored silc to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36543
diff
changeset
|
35 | #define SILCPURPLE_IS_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SILCPURPLE_TYPE_PROTOCOL)) |
|
36660
ddb40f691d20
Renamed certain protocol type names to better suit the naming convention used by the protocol
Ankit Vani <a@nevitus.org>
parents:
36638
diff
changeset
|
36 | #define SILCPURPLE_PROTOCOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SILCPURPLE_TYPE_PROTOCOL, SilcProtocolClass)) |
|
36595
d013a99e6d94
Refactored silc to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36543
diff
changeset
|
37 | |
| 8849 | 38 | /* Default public and private key file names */ |
| 15884 | 39 | #define SILCPURPLE_PUBLIC_KEY_NAME "public_key.pub" |
| 40 | #define SILCPURPLE_PRIVATE_KEY_NAME "private_key.prv" | |
| 8849 | 41 | |
| 42 | /* Default settings for creating key pair */ | |
| 15884 | 43 | #define SILCPURPLE_DEF_PKCS "rsa" |
| 44 | #define SILCPURPLE_DEF_PKCS_LEN 2048 | |
| 8849 | 45 | |
| 15884 | 46 | #define SILCPURPLE_PRVGRP 0x001fffff |
| 8849 | 47 | |
|
10050
78e480f768f2
[gaim-migrate @ 11011]
Dave West <kat@users.sourceforge.net>
parents:
9917
diff
changeset
|
48 | /* Status IDs */ |
| 15884 | 49 | #define SILCPURPLE_STATUS_ID_OFFLINE "offline" |
| 50 | #define SILCPURPLE_STATUS_ID_AVAILABLE "available" | |
| 51 | #define SILCPURPLE_STATUS_ID_HYPER "hyper" | |
| 52 | #define SILCPURPLE_STATUS_ID_AWAY "away" | |
| 53 | #define SILCPURPLE_STATUS_ID_BUSY "busy" | |
| 54 | #define SILCPURPLE_STATUS_ID_INDISPOSED "indisposed" | |
| 55 | #define SILCPURPLE_STATUS_ID_PAGE "page" | |
|
10050
78e480f768f2
[gaim-migrate @ 11011]
Dave West <kat@users.sourceforge.net>
parents:
9917
diff
changeset
|
56 | |
|
39556
622bf98df0ac
Remove unnecessary struct tags.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37418
diff
changeset
|
57 | typedef struct |
|
36595
d013a99e6d94
Refactored silc to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36543
diff
changeset
|
58 | { |
|
d013a99e6d94
Refactored silc to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36543
diff
changeset
|
59 | PurpleProtocol parent; |
|
36660
ddb40f691d20
Renamed certain protocol type names to better suit the naming convention used by the protocol
Ankit Vani <a@nevitus.org>
parents:
36638
diff
changeset
|
60 | } SilcProtocol; |
|
36595
d013a99e6d94
Refactored silc to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36543
diff
changeset
|
61 | |
|
39556
622bf98df0ac
Remove unnecessary struct tags.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37418
diff
changeset
|
62 | typedef struct |
|
36595
d013a99e6d94
Refactored silc to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36543
diff
changeset
|
63 | { |
|
d013a99e6d94
Refactored silc to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36543
diff
changeset
|
64 | PurpleProtocolClass parent_class; |
|
36660
ddb40f691d20
Renamed certain protocol type names to better suit the naming convention used by the protocol
Ankit Vani <a@nevitus.org>
parents:
36638
diff
changeset
|
65 | } SilcProtocolClass; |
|
36595
d013a99e6d94
Refactored silc to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36543
diff
changeset
|
66 | |
| 8849 | 67 | typedef struct { |
| 68 | unsigned long id; | |
| 69 | const char *channel; | |
| 70 | unsigned long chid; | |
| 71 | const char *parentch; | |
| 72 | SilcChannelPrivateKey key; | |
| 15884 | 73 | } *SilcPurplePrvgrp; |
| 8849 | 74 | |
| 15884 | 75 | /* The SILC Purple plugin context */ |
| 76 | typedef struct SilcPurpleStruct { | |
|
40115
68872ce295a4
Convert SILC to GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40113
diff
changeset
|
77 | GCancellable *cancellable; |
|
68872ce295a4
Convert SILC to GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40113
diff
changeset
|
78 | GSocketConnection *sockconn; |
|
68872ce295a4
Convert SILC to GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40113
diff
changeset
|
79 | |
| 8849 | 80 | SilcClient client; |
| 81 | SilcClientConnection conn; | |
|
17675
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
82 | SilcPublicKey public_key; |
|
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
83 | SilcPrivateKey private_key; |
|
20289
5c844288fbec
applied changes from 32f31e981f0618a4167aa98bcc22c2dab13d1550
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
17680
diff
changeset
|
84 | SilcHash sha1hash; |
| 8849 | 85 | |
|
20289
5c844288fbec
applied changes from 32f31e981f0618a4167aa98bcc22c2dab13d1550
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
17680
diff
changeset
|
86 | SilcDList tasks; |
| 8849 | 87 | guint scheduler; |
| 15884 | 88 | PurpleConnection *gc; |
| 89 | PurpleAccount *account; | |
| 8849 | 90 | unsigned long channel_ids; |
| 91 | GList *grps; | |
| 92 | ||
| 93 | char *motd; | |
| 15884 | 94 | PurpleRoomlist *roomlist; |
|
12217
ea610d8ab584
[gaim-migrate @ 14519]
Pekka Riikonen <priikone@silcnet.org>
parents:
12216
diff
changeset
|
95 | SilcMimeAssembler mimeass; |
| 8849 | 96 | unsigned int detaching : 1; |
| 97 | unsigned int resuming : 1; | |
|
30708
535bec1e66fb
Standardize on "cancelled".
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
20289
diff
changeset
|
98 | unsigned int roomlist_cancelled : 1; |
| 8849 | 99 | unsigned int chpk : 1; |
| 15884 | 100 | } *SilcPurple; |
| 8849 | 101 | |
| 102 | ||
|
36775
5e59f252d777
Added G_MODULE_EXPORT declaration to protocol get_type() functions
Ankit Vani <a@nevitus.org>
parents:
36688
diff
changeset
|
103 | G_MODULE_EXPORT GType silcpurple_protocol_get_type(void); |
|
36595
d013a99e6d94
Refactored silc to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36543
diff
changeset
|
104 | |
|
17675
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
105 | void silc_say(SilcClient client, SilcClientConnection conn, |
|
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
106 | SilcClientMessageType type, char *msg, ...); |
|
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
107 | SilcBool silcpurple_command_reply(SilcClient client, SilcClientConnection conn, |
|
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
108 | SilcCommand command, SilcStatus status, |
|
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
109 | SilcStatus error, void *context, va_list ap); |
| 15884 | 110 | gboolean silcpurple_check_silc_dir(PurpleConnection *gc); |
| 111 | const char *silcpurple_silcdir(void); | |
| 112 | const char *silcpurple_session_file(const char *account); | |
| 113 | void silcpurple_verify_public_key(SilcClient client, SilcClientConnection conn, | |
|
17675
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
114 | const char *name, |
|
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
115 | SilcConnectionType conn_type, |
|
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
116 | SilcPublicKey public_key, |
|
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
117 | SilcVerifyPublicKey completion, |
|
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
118 | void *context); |
| 15884 | 119 | GList *silcpurple_buddy_menu(PurpleBuddy *buddy); |
|
40769
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
120 | void silcpurple_add_buddy(PurpleProtocolServer *protocol_server, PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group, const char *message); |
| 15884 | 121 | void silcpurple_send_buddylist(PurpleConnection *gc); |
|
40769
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
122 | void silcpurple_remove_buddy(PurpleProtocolServer *protocol_server, PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); |
| 15884 | 123 | void silcpurple_buddy_keyagr_request(SilcClient client, |
|
17675
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
124 | SilcClientConnection conn, |
|
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
125 | SilcClientEntry client_entry, |
|
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
126 | const char *hostname, SilcUInt16 port, |
|
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
127 | SilcUInt16 protocol); |
|
40769
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
128 | void silcpurple_idle_set(PurpleProtocolServer *protocol_server, PurpleConnection *gc, int idle); |
|
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
129 | void silcpurple_tooltip_text(PurpleProtocolClient *ppclient, PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full); |
|
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
130 | char *silcpurple_status_text(PurpleProtocolClient *ppclient, PurpleBuddy *b); |
| 15884 | 131 | gboolean silcpurple_ip_is_private(const char *ip); |
|
40769
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
132 | void silcpurple_ftp_send_file(PurpleProtocolXfer *prplxfer, PurpleConnection *gc, const char *name, const char *file); |
|
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
133 | PurpleXfer *silcpurple_ftp_new_xfer(PurpleProtocolXfer *prplxfer, PurpleConnection *gc, const char *name); |
| 15884 | 134 | void silcpurple_ftp_request(SilcClient client, SilcClientConnection conn, |
| 8849 | 135 | SilcClientEntry client_entry, SilcUInt32 session_id, |
| 136 | const char *hostname, SilcUInt16 port); | |
| 15884 | 137 | void silcpurple_show_public_key(SilcPurple sg, |
| 8849 | 138 | const char *name, SilcPublicKey public_key, |
| 139 | GCallback callback, void *context); | |
|
40769
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
140 | void silcpurple_get_info(PurpleProtocolServer *protocol_server, PurpleConnection *gc, const char *who); |
| 8849 | 141 | SilcAttributePayload |
| 15884 | 142 | silcpurple_get_attr(SilcDList attrs, SilcAttribute attribute); |
| 143 | void silcpurple_get_umode_string(SilcUInt32 mode, char *buf, | |
| 8849 | 144 | SilcUInt32 buf_size); |
| 15884 | 145 | void silcpurple_get_chmode_string(SilcUInt32 mode, char *buf, |
| 8849 | 146 | SilcUInt32 buf_size); |
| 15884 | 147 | void silcpurple_get_chumode_string(SilcUInt32 mode, char *buf, |
| 8849 | 148 | SilcUInt32 buf_size); |
|
40769
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
149 | GList *silcpurple_chat_info(PurpleProtocolChat *protocol_chat, PurpleConnection *gc); |
|
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
150 | GHashTable *silcpurple_chat_info_defaults(PurpleProtocolChat *protocol_chat, PurpleConnection *gc, const char *chat_name); |
| 15884 | 151 | GList *silcpurple_chat_menu(PurpleChat *); |
|
40769
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
152 | void silcpurple_chat_join(PurpleProtocolChat *protocol_chat, PurpleConnection *gc, GHashTable *data); |
|
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
153 | char *silcpurple_get_chat_name(PurpleProtocolChat *protocol_chat, GHashTable *data); |
|
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
154 | void silcpurple_chat_invite(PurpleProtocolChat *protocol_chat, PurpleConnection *gc, int id, const char *msg, |
| 8849 | 155 | const char *name); |
|
40769
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
156 | void silcpurple_chat_leave(PurpleProtocolChat *protocol_chat, PurpleConnection *gc, int id); |
|
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
157 | int silcpurple_chat_send(PurpleProtocolChat *protocol_chat, PurpleConnection *gc, int id, PurpleMessage *msg); |
|
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
158 | void silcpurple_chat_set_topic(PurpleProtocolChat *protocol_chat, PurpleConnection *gc, int id, const char *topic); |
| 15884 | 159 | PurpleRoomlist *silcpurple_roomlist_get_list(PurpleConnection *gc); |
| 160 | void silcpurple_roomlist_cancel(PurpleRoomlist *list); | |
| 161 | void silcpurple_chat_chauth_show(SilcPurple sg, SilcChannelEntry channel, | |
|
17675
e7069bf1de1a
Patch from Pekka Riikonen to update the SILC protocol plugin to work with
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16549
diff
changeset
|
162 | SilcDList channel_pubkeys); |
| 15884 | 163 | void silcpurple_parse_attrs(SilcDList attrs, char **moodstr, char **statusstr, |
|
9488
9d6520fa53fd
[gaim-migrate @ 10313]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9466
diff
changeset
|
164 | char **contactstr, char **langstr, char **devicestr, |
|
9d6520fa53fd
[gaim-migrate @ 10313]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9466
diff
changeset
|
165 | char **tzstr, char **geostr); |
|
40769
2214cc7b95ca
Fix SILC compilation
Arkadiy Illarionov <qarkai@gmail.com>
parents:
40358
diff
changeset
|
166 | void silcpurple_buddy_set_icon(PurpleProtocolServer *protocol_server, PurpleConnection *gc, PurpleImage *img); |
|
33798
ab26d8e3da97
silc: Use appropriate datatype for SilcMessageFlags
Daniel Atallah <datallah@pidgin.im>
parents:
30708
diff
changeset
|
167 | SilcDList silcpurple_image_message(const char *msg, SilcMessageFlags *mflags); |
| 8849 | 168 | |
|
9353
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
169 | #ifdef _WIN32 |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
170 | typedef int uid_t; |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
171 | |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
172 | struct passwd { |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
173 | char *pw_name; /* user name */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
174 | char *pw_passwd; /* user password */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
175 | int pw_uid; /* user id */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
176 | int pw_gid; /* group id */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
177 | char *pw_gecos; /* real name */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
178 | char *pw_dir; /* home directory */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
179 | char *pw_shell; /* shell program */ |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
180 | }; |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
181 | |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
182 | struct passwd *getpwuid(int uid); |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
12217
diff
changeset
|
183 | int getuid(void); |
|
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
12217
diff
changeset
|
184 | int geteuid(void); |
|
9353
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
185 | #endif |
|
ff6546387358
[gaim-migrate @ 10161]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9288
diff
changeset
|
186 | |
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39556
diff
changeset
|
187 | #endif /* PURPLE_SILC_SILCPURPLE_H */ |