1
#ifndef __SGE_SECURITY_H
2
#define __SGE_SECURITY_H
3
/*___INFO__MARK_BEGIN__*/
4
/*************************************************************************
6
* The Contents of this file are made available subject to the terms of
7
* the Sun Industry Standards Source License Version 1.2
9
* Sun Microsystems Inc., March, 2001
12
* Sun Industry Standards Source License Version 1.2
13
* =================================================
14
* The contents of this file are subject to the Sun Industry Standards
15
* Source License Version 1.2 (the "License"); You may not use this file
16
* except in compliance with the License. You may obtain a copy of the
17
* License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
19
* Software provided under this License is provided on an "AS IS" basis,
20
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
21
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
22
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
23
* See the License for the specific provisions governing your rights and
24
* obligations concerning the Software.
26
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
28
* Copyright: 2001 by Sun Microsystems, Inc.
30
* All Rights Reserved.
32
************************************************************************/
33
/*___INFO__MARK_END__*/
37
#include "sge_qmaster_timed_event.h"
38
#include "gdi/sge_gdi_ctx.h"
39
#include "gdi/sge_gdi_packet.h"
46
#define SGE_SEC_BUFSIZE 1024
48
void sge_security_exit(int i);
51
/* int 0 on success, -1 on failure */
52
int sge_ssl_setup_security_path(const char *progname, const char *username);
57
int kerb_job(lListElem *jelem, struct dispatch_entry *de);
60
void tgt2cc(lListElem *jep, const char *rhost);
61
void tgtcclr(lListElem *jep, const char *rhost);
62
int set_sec_cred(const char *sge_root, const char *mastername, lListElem *job, lList **alpp);
63
void delete_credentials(const char *sge_root, lListElem *jep);
64
bool cache_sec_cred(const char *sge_root, lListElem *jep, const char *rhost);
65
int store_sec_cred(const char *sge_root, sge_gdi_packet_class_t *packe, lListElem *jep,
66
int do_authentication, lList **alpp);
67
int store_sec_cred2(const char* sge_root,
68
const char* unqualified_hostname,
70
int do_authentication,
74
int sge_security_verify_user(const char *host, const char *commproc, u_long32 id,
75
const char *admin_user, const char *user, const char *progname);
77
bool sge_security_verify_unique_identifier(bool check_admin_user,
83
unsigned long commid);
85
void sge_security_event_handler(sge_gdi_ctx_class_t *ctx, te_event_t anEvent, monitoring_t *monitor);
88
sge_gdi_packet_initialize_auth_info(sge_gdi_ctx_class_t *ctx,
89
sge_gdi_packet_class_t *packet_handle);
92
sge_gdi_packet_parse_auth_info(sge_gdi_packet_class_t *packet, lList **answer_list,
93
uid_t *uid, char *user, size_t user_len,
94
gid_t *gid, char *group, size_t group_len);
96
#endif /* __SGE_SECURITY_H */