~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/libs/gdi/sge_security.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __SGE_SECURITY_H
 
2
#define __SGE_SECURITY_H
 
3
/*___INFO__MARK_BEGIN__*/
 
4
/*************************************************************************
 
5
 * 
 
6
 *  The Contents of this file are made available subject to the terms of
 
7
 *  the Sun Industry Standards Source License Version 1.2
 
8
 * 
 
9
 *  Sun Microsystems Inc., March, 2001
 
10
 * 
 
11
 * 
 
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
 
18
 * 
 
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.
 
25
 * 
 
26
 *   The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 
27
 * 
 
28
 *   Copyright: 2001 by Sun Microsystems, Inc.
 
29
 * 
 
30
 *   All Rights Reserved.
 
31
 * 
 
32
 ************************************************************************/
 
33
/*___INFO__MARK_END__*/
 
34
 
 
35
#include "cull.h"
 
36
#include "sge_gdiP.h"
 
37
#include "sge_qmaster_timed_event.h"
 
38
#include "gdi/sge_gdi_ctx.h"
 
39
#include "gdi/sge_gdi_packet.h"
 
40
 
 
41
 
 
42
#ifdef KERBEROS
 
43
#   include "krb_lib.h"
 
44
#endif
 
45
 
 
46
#define SGE_SEC_BUFSIZE 1024
 
47
 
 
48
void sge_security_exit(int i);
 
49
 
 
50
#ifdef SECURE
 
51
/* int 0 on success, -1 on failure */
 
52
int sge_ssl_setup_security_path(const char *progname, const char *username);
 
53
#endif
 
54
 
 
55
 
 
56
#ifdef KERBEROS
 
57
int kerb_job(lListElem *jelem, struct dispatch_entry *de);
 
58
#endif
 
59
 
 
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, 
 
69
                    lListElem *jelem, 
 
70
                    int do_authentication, 
 
71
                    int *general, 
 
72
                    dstring *err_str);
 
73
 
 
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); 
 
76
 
 
77
bool sge_security_verify_unique_identifier(bool check_admin_user, 
 
78
                                           const char* user, 
 
79
                                           const char* progname,
 
80
                                           unsigned long progid, 
 
81
                                           const char* hostname, 
 
82
                                           const char* commproc, 
 
83
                                           unsigned long commid);
 
84
 
 
85
void sge_security_event_handler(sge_gdi_ctx_class_t *ctx, te_event_t anEvent, monitoring_t *monitor);
 
86
 
 
87
bool
 
88
sge_gdi_packet_initialize_auth_info(sge_gdi_ctx_class_t *ctx,
 
89
                                    sge_gdi_packet_class_t *packet_handle);
 
90
 
 
91
bool  
 
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);
 
95
 
 
96
#endif /* __SGE_SECURITY_H */
 
97