/[smeserver]/rpms/sudo/sme9/sudo-1.8.6p3-constwarnfix.patch
ViewVC logotype

Contents of /rpms/sudo/sme9/sudo-1.8.6p3-constwarnfix.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu Feb 4 19:44:09 2021 UTC (3 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: sudo-1_8_6p3-30_el6_sme, sudo-1_8_6p3-29_el6_9, HEAD
Sudo

1 diff -up sudo-1.8.6p3/plugins/sudoers/match.c.constwarnfix sudo-1.8.6p3/plugins/sudoers/match.c
2 --- sudo-1.8.6p3/plugins/sudoers/match.c.constwarnfix 2014-07-30 13:47:48.270007851 +0200
3 +++ sudo-1.8.6p3/plugins/sudoers/match.c 2014-07-30 13:47:07.327759179 +0200
4 @@ -599,7 +599,7 @@ command_matches_dir(char *sudoers_dir, s
5 * Returns true if the hostname matches the pattern, else false
6 */
7 bool
8 -hostname_matches(char *shost, char *lhost, char *pattern)
9 +hostname_matches(const char *shost, const char *lhost, const char *pattern)
10 {
11 debug_decl(hostname_matches, SUDO_DEBUG_MATCH)
12
13 @@ -621,7 +621,7 @@ hostname_matches(char *shost, char *lhos
14 * else returns false.
15 */
16 bool
17 -userpw_matches(char *sudoers_user, char *user, struct passwd *pw)
18 +userpw_matches(const char *sudoers_user, const char *user, const struct passwd *pw)
19 {
20 debug_decl(userpw_matches, SUDO_DEBUG_MATCH)
21 if (pw != NULL && *sudoers_user == '#') {
22 @@ -640,7 +640,7 @@ userpw_matches(char *sudoers_user, char
23 * else returns false.
24 */
25 bool
26 -group_matches(char *sudoers_group, struct group *gr)
27 +group_matches(const char *sudoers_group, const struct group *gr)
28 {
29 debug_decl(group_matches, SUDO_DEBUG_MATCH)
30 if (*sudoers_group == '#') {
31 @@ -659,7 +659,7 @@ group_matches(char *sudoers_group, struc
32 * else returns false.
33 */
34 bool
35 -usergr_matches(char *group, char *user, struct passwd *pw)
36 +usergr_matches(const char *group, const char *user, const struct passwd *pw)
37 {
38 int matched = false;
39 struct passwd *pw0 = NULL;
40 @@ -707,7 +707,7 @@ done:
41 * XXX - swap order of host & shost
42 */
43 bool
44 -netgr_matches(char *netgr, char *lhost, char *shost, char *user)
45 +netgr_matches(const char *netgr, const char *lhost, const char *shost, const char *user)
46 {
47 static char *domain;
48 #ifdef HAVE_GETDOMAINNAME
49 diff -up sudo-1.8.6p3/plugins/sudoers/parse.h.constwarnfix sudo-1.8.6p3/plugins/sudoers/parse.h
50 --- sudo-1.8.6p3/plugins/sudoers/parse.h.constwarnfix 2014-07-30 13:47:39.205174182 +0200
51 +++ sudo-1.8.6p3/plugins/sudoers/parse.h 2014-07-30 13:47:08.602735779 +0200
52 @@ -188,11 +188,11 @@ bool addr_matches(char *n);
53
54 /* match.c */
55 bool command_matches(char *sudoers_cmnd, char *sudoers_args);
56 -bool group_matches(char *sudoers_group, struct group *gr);
57 -bool hostname_matches(char *shost, char *lhost, char *pattern);
58 -bool netgr_matches(char *netgr, char *lhost, char *shost, char *user);
59 -bool usergr_matches(char *group, char *user, struct passwd *pw);
60 -bool userpw_matches(char *sudoers_user, char *user, struct passwd *pw);
61 +bool group_matches(const char *sudoers_group, const struct group *gr);
62 +bool hostname_matches(const char *shost, const char *lhost, const char *pattern);
63 +bool netgr_matches(const char *netgr, const char *lhost, const char *shost, const char *user);
64 +bool usergr_matches(const char *group, const char *user, const struct passwd *pw);
65 +bool userpw_matches(const char *sudoers_user, const char *user, const struct passwd *pw);
66 int cmnd_matches(struct member *m);
67 int cmndlist_matches(struct member_list *list);
68 int hostlist_matches(struct member_list *list);
69 diff -up sudo-1.8.6p3/plugins/sudoers/pwutil.c.constwarnfix sudo-1.8.6p3/plugins/sudoers/pwutil.c
70 --- sudo-1.8.6p3/plugins/sudoers/pwutil.c.constwarnfix 2014-07-30 13:50:25.681120795 +0200
71 +++ sudo-1.8.6p3/plugins/sudoers/pwutil.c 2014-07-30 13:51:59.998391934 +0200
72 @@ -841,7 +841,7 @@ sudo_endgrent(void)
73 }
74
75 struct group_list *
76 -sudo_get_grlist(struct passwd *pw)
77 +sudo_get_grlist(const struct passwd *pw)
78 {
79 struct cache_item key, *item;
80 struct rbnode *node;
81 @@ -905,7 +905,7 @@ done:
82 }
83
84 bool
85 -user_in_group(struct passwd *pw, const char *group)
86 +user_in_group(const struct passwd *pw, const char *group)
87 {
88 struct group_list *grlist;
89 struct group *grp = NULL;
90 diff -up sudo-1.8.6p3/plugins/sudoers/sudoers.h.constwarnfix sudo-1.8.6p3/plugins/sudoers/sudoers.h
91 --- sudo-1.8.6p3/plugins/sudoers/sudoers.h.constwarnfix 2014-07-30 13:50:09.704413719 +0200
92 +++ sudo-1.8.6p3/plugins/sudoers/sudoers.h 2014-07-30 13:51:57.991428715 +0200
93 @@ -289,9 +289,9 @@ __dso_public struct group *sudo_getgrgid
94 __dso_public struct group *sudo_getgrnam(const char *);
95 __dso_public void sudo_gr_addref(struct group *);
96 __dso_public void sudo_gr_delref(struct group *);
97 -bool user_in_group(struct passwd *, const char *);
98 +bool user_in_group(const struct passwd *, const char *);
99 struct group *sudo_fakegrnam(const char *);
100 -struct group_list *sudo_get_grlist(struct passwd *pw);
101 +struct group_list *sudo_get_grlist(const struct passwd *pw);
102 struct passwd *sudo_fakepwnam(const char *, gid_t);
103 struct passwd *sudo_fakepwnamid(const char *user, uid_t uid, gid_t gid);
104 struct passwd *sudo_getpwnam(const char *);

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed