summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raffenetti <raffenet@mcs.anl.gov>2007-02-16 23:08:33 +0000
committerKen Raffenetti <raffenet@mcs.anl.gov>2007-02-16 23:08:33 +0000
commitc5d758977084b89283706ac9b780f31094ac98ad (patch)
treef0e9256fb9f55cf77e123cc4aff64f9ae799cfbc /src
parentec792474be03120e868f5b48788209c2a845bad7 (diff)
downloadbcfg2-c5d758977084b89283706ac9b780f31094ac98ad.tar.gz
bcfg2-c5d758977084b89283706ac9b780f31094ac98ad.tar.bz2
bcfg2-c5d758977084b89283706ac9b780f31094ac98ad.zip
fixed bug in nis authentication
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2836 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Hostbase/nisauth.py2
-rw-r--r--src/lib/Server/Hostbase/urls.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/Server/Hostbase/nisauth.py b/src/lib/Server/Hostbase/nisauth.py
index 9bce9511f..9c7da8c0a 100644
--- a/src/lib/Server/Hostbase/nisauth.py
+++ b/src/lib/Server/Hostbase/nisauth.py
@@ -35,7 +35,7 @@ class nisauth(object):
if p[1] == crypt.crypt(passwd, p[1][:2]):
# check to see if user is in valid support groups
# will have to include these groups in a settings file eventually
- if not login in nis.match(AUTHORIZED_GROUP, 'group.byname').split(':')[-1].split(','):
+ if not login in nis.match(AUTHORIZED_GROUP, 'group.byname').split(':')[-1].split(',') and p[3] != nis.match(AUTHORIZED_GROUP, 'group.byname').split(':')[2]:
raise NISAUTHError('group')
self.uid = p[2]
else:
diff --git a/src/lib/Server/Hostbase/urls.py b/src/lib/Server/Hostbase/urls.py
index fe76ae7b2..d4dae4f3f 100644
--- a/src/lib/Server/Hostbase/urls.py
+++ b/src/lib/Server/Hostbase/urls.py
@@ -14,6 +14,7 @@ urlpatterns = patterns('Bcfg2.Server.Hostbase.hostbase.views',
(r'^hostbase/(?P<host_id>\d+)/dns/edit', 'dnsedit'),
(r'^hostbase/(?P<host_id>\d+)/dns', 'dns'),
(r'^hostbase/new', 'new'),
+ (r'^hostbase/(?P<host_id>\d+)/copy', 'copy'),
(r'^hostbase/hostinfo', 'hostinfo'),
(r'^hostbase/zones/$', 'zones'),
(r'^hostbase/zones/(?P<zone_id>\d+)/$', 'zoneview'),