diff options
author | Andreas Schneider <asn@samba.org> | 2011-08-19 18:10:29 +0200 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2011-08-21 09:08:25 -0400 |
commit | 61ada700a6ad010846b132d866c66220e6379054 (patch) | |
tree | bdcf9da432dc302d5c276ae192fc50fe6332e23c /source3 | |
parent | 177db0a8802842a0eb9801622bee9f4c1592ef88 (diff) | |
download | samba-61ada700a6ad010846b132d866c66220e6379054.tar.gz samba-61ada700a6ad010846b132d866c66220e6379054.tar.bz2 samba-61ada700a6ad010846b132d866c66220e6379054.zip |
s3-id_cache: Use better names for id cache management ops
The IDMAP term is normally associated with Winbind's idmap stuff.
These functions deal with id caching not id mapping.
Signed-off-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/id_cache.c | 26 | ||||
-rw-r--r-- | source3/lib/id_cache.h | 2 | ||||
-rw-r--r-- | source3/librpc/idl/messaging.idl | 6 | ||||
-rw-r--r-- | source3/smbd/msg_idmap.c | 6 | ||||
-rw-r--r-- | source3/smbd/proto.h | 2 | ||||
-rw-r--r-- | source3/smbd/server.c | 4 | ||||
-rw-r--r-- | source3/utils/smbcontrol.c | 6 |
7 files changed, 26 insertions, 26 deletions
diff --git a/source3/lib/id_cache.c b/source3/lib/id_cache.c index 50649dd409..f78064ea31 100644 --- a/source3/lib/id_cache.c +++ b/source3/lib/id_cache.c @@ -146,11 +146,11 @@ static void delete_from_cache(const struct id_cache_ref* id) } -static void message_idmap_flush(struct messaging_context *msg_ctx, - void* private_data, - uint32_t msg_type, - struct server_id server_id, - DATA_BLOB* data) +static void id_cache_flush(struct messaging_context *msg_ctx, + void* private_data, + uint32_t msg_type, + struct server_id server_id, + DATA_BLOB* data) { const char *msg = data ? (const char *)data->data : NULL; @@ -166,11 +166,11 @@ static void message_idmap_flush(struct messaging_context *msg_ctx, } } -static void message_idmap_delete(struct messaging_context *msg_ctx, - void *private_data, - uint32_t msg_type, - struct server_id server_id, - DATA_BLOB* data) +static void id_cache_delete(struct messaging_context *msg_ctx, + void *private_data, + uint32_t msg_type, + struct server_id server_id, + DATA_BLOB* data) { const char *msg = (data && data->data) ? (const char *)data->data : "<NULL>"; struct id_cache_ref id; @@ -183,8 +183,8 @@ static void message_idmap_delete(struct messaging_context *msg_ctx, delete_from_cache(&id); } -void msg_idmap_register_msgs(struct messaging_context *ctx) +void id_cache_register_msgs(struct messaging_context *ctx) { - messaging_register(ctx, NULL, MSG_IDMAP_FLUSH, message_idmap_flush); - messaging_register(ctx, NULL, MSG_IDMAP_DELETE, message_idmap_delete); + messaging_register(ctx, NULL, ID_CACHE_FLUSH, id_cache_flush); + messaging_register(ctx, NULL, ID_CACHE_DELETE, id_cache_delete); } diff --git a/source3/lib/id_cache.h b/source3/lib/id_cache.h index fc78f75192..9aa0e03586 100644 --- a/source3/lib/id_cache.h +++ b/source3/lib/id_cache.h @@ -29,4 +29,4 @@ struct id_cache_ref { bool id_cache_ref_parse(const char* str, struct id_cache_ref* id); -void msg_idmap_register_msgs(struct messaging_context *ctx); +void id_cache_register_msgs(struct messaging_context *ctx); diff --git a/source3/librpc/idl/messaging.idl b/source3/librpc/idl/messaging.idl index b0c4245b39..53aabfad21 100644 --- a/source3/librpc/idl/messaging.idl +++ b/source3/librpc/idl/messaging.idl @@ -35,9 +35,9 @@ interface messaging MSG_REQ_DMALLOC_LOG_CHANGED = 0x000C, MSG_SHUTDOWN = 0x000D, - MSG_IDMAP_FLUSH = 0x000E, - MSG_IDMAP_DELETE = 0x000F, - MSG_IDMAP_KILL = 0x0010, + ID_CACHE_FLUSH = 0x000E, + ID_CACHE_DELETE = 0x000F, + ID_CACHE_KILL = 0x0010, /* Changes to smb.conf are really of general interest */ MSG_SMB_CONF_UPDATED = 0x0021, diff --git a/source3/smbd/msg_idmap.c b/source3/smbd/msg_idmap.c index 0a24bb1626..702f545bb1 100644 --- a/source3/smbd/msg_idmap.c +++ b/source3/smbd/msg_idmap.c @@ -86,7 +86,7 @@ static bool id_in_use(const struct user_struct* user, return false; } -static void message_idmap_kill(struct messaging_context *msg_ctx, +static void id_cache_kill(struct messaging_context *msg_ctx, void *private_data, uint32_t msg_type, struct server_id server_id, @@ -106,7 +106,7 @@ static void message_idmap_kill(struct messaging_context *msg_ctx, } } -void msg_idmap_register_kill_msg(struct messaging_context *ctx) +void id_cache_register_kill_msg(struct messaging_context *ctx) { - messaging_register(ctx, NULL, MSG_IDMAP_KILL, message_idmap_kill); + messaging_register(ctx, NULL, ID_CACHE_KILL, id_cache_kill); } diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 554d907d89..289c012b48 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -1182,6 +1182,6 @@ void *avahi_start_register(TALLOC_CTX *mem_ctx, struct tevent_context *ev, /* The following definitions come from smbd/msg_idmap.c */ -void msg_idmap_register_kill_msg(struct messaging_context *ctx); +void id_cache_register_kill_msg(struct messaging_context *ctx); #endif /* _SMBD_PROTO_H_ */ diff --git a/source3/smbd/server.c b/source3/smbd/server.c index e547d38581..26e3c86edf 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -749,8 +749,8 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent, smb_pcap_updated); brl_register_msgs(msg_ctx); - msg_idmap_register_msgs(msg_ctx); - msg_idmap_register_kill_msg(msg_ctx); + id_cache_register_msgs(msg_ctx); + id_cache_register_kill_msg(msg_ctx); #ifdef CLUSTER_SUPPORT if (lp_clustering()) { diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 91f6493fba..246c3aa9b8 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -197,13 +197,13 @@ static bool do_idmap(struct messaging_context *msg_ctx, } if (strcmp(argv[1], "flush") == 0) { - msg_type = MSG_IDMAP_FLUSH; + msg_type = ID_CACHE_FLUSH; } else if (strcmp(argv[1], "delete") == 0) { - msg_type = MSG_IDMAP_DELETE; + msg_type = ID_CACHE_DELETE; } else if (strcmp(argv[1], "kill") == 0) { - msg_type = MSG_IDMAP_KILL; + msg_type = ID_CACHE_KILL; } else if (strcmp(argv[1], "help") == 0) { fprintf(stdout, "%s", usage); |