From f042de2f346c98a852957cdbb09a7f8ac871b69c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 4 Apr 2012 14:53:10 -0700 Subject: First part of fix for bug 8837 - smbd crashes when deleting directory and veto files are enabled. Add some const to the sec_ctx code. --- source3/smbd/proto.h | 2 +- source3/smbd/sec_ctx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 4bb57c0d5c..1af07882b5 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -956,7 +956,7 @@ void server_encryption_shutdown(struct smbd_server_connection *sconn); bool unix_token_equal(const struct security_unix_token *t1, const struct security_unix_token *t2); bool push_sec_ctx(void); -void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, struct security_token *token); +void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, const struct security_token *token); void set_root_sec_ctx(void); bool pop_sec_ctx(void); void init_sec_ctx(void); diff --git a/source3/smbd/sec_ctx.c b/source3/smbd/sec_ctx.c index 99592815e3..d83dbd0cb6 100644 --- a/source3/smbd/sec_ctx.c +++ b/source3/smbd/sec_ctx.c @@ -305,7 +305,7 @@ static void set_unix_security_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *grou Set the current security context to a given user. ****************************************************************************/ -void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, struct security_token *token) +void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, const struct security_token *token) { struct sec_ctx *ctx_p = &sec_ctx_stack[sec_ctx_stack_ndx]; -- cgit