summaryrefslogtreecommitdiffstats
path: root/ipa-server
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-server')
-rw-r--r--ipa-server/Makefile2
-rw-r--r--ipa-server/ipa-web/Makefile9
-rw-r--r--ipa-server/ipa-web/api/README0
-rw-r--r--ipa-server/ipa-web/client/Makefile11
-rw-r--r--ipa-server/ipa-web/client/README0
-rw-r--r--ipa-server/ipa-web/client/rpcclient.py102
-rw-r--r--ipa-server/ipa-web/gui/README0
-rw-r--r--ipa-server/ipaserver/ipaldap.py (renamed from ipa-server/ipa-web/client/ipaldap.py)0
-rw-r--r--ipa-server/xmlrpc-server/Makefile (renamed from ipa-server/ipa-web/api/Makefile)2
-rw-r--r--ipa-server/xmlrpc-server/README (renamed from ipa-server/ipa-web/README)0
-rw-r--r--ipa-server/xmlrpc-server/funcs.py (renamed from ipa-server/ipa-web/api/funcs.py)16
-rw-r--r--ipa-server/xmlrpc-server/ipa.conf (renamed from ipa-server/ipa-web/api/ipa.conf)4
-rw-r--r--ipa-server/xmlrpc-server/ipaxmlrpc.py (renamed from ipa-server/ipa-web/api/ipaxmlrpc.py)18
13 files changed, 15 insertions, 149 deletions
diff --git a/ipa-server/Makefile b/ipa-server/Makefile
index 0976df430..dd3fa71ef 100644
--- a/ipa-server/Makefile
+++ b/ipa-server/Makefile
@@ -1,4 +1,4 @@
-SUBDIRS=ipa-install
+SUBDIRS=ipa-install xmlrpc-server
PYTHONDIR=$(DESTDIR)/usr/share/ipa/ipaserver
all:
diff --git a/ipa-server/ipa-web/Makefile b/ipa-server/ipa-web/Makefile
deleted file mode 100644
index 055ee9f44..000000000
--- a/ipa-server/ipa-web/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-all: ;
-
-install:
- $(MAKE) -C api $@
- $(MAKE) -C client $@
-
-clean:
- $(MAKE) -C api $@
- rm -f *~
diff --git a/ipa-server/ipa-web/api/README b/ipa-server/ipa-web/api/README
deleted file mode 100644
index e69de29bb..000000000
--- a/ipa-server/ipa-web/api/README
+++ /dev/null
diff --git a/ipa-server/ipa-web/client/Makefile b/ipa-server/ipa-web/client/Makefile
deleted file mode 100644
index bc6554be4..000000000
--- a/ipa-server/ipa-web/client/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-PYTHONLIBDIR ?= $(shell python -c "from distutils.sysconfig import *; print get_python_lib(1)")
-PACKAGEDIR ?= $(DESTDIR)/$(PYTHONLIBDIR)/ipa
-
-all: ;
-
-install:
- -mkdir -p $(PACKAGEDIR)
- install -m 644 *.py $(PACKAGEDIR)
-
-clean:
- rm -f *~ *.pyc \ No newline at end of file
diff --git a/ipa-server/ipa-web/client/README b/ipa-server/ipa-web/client/README
deleted file mode 100644
index e69de29bb..000000000
--- a/ipa-server/ipa-web/client/README
+++ /dev/null
diff --git a/ipa-server/ipa-web/client/rpcclient.py b/ipa-server/ipa-web/client/rpcclient.py
deleted file mode 100644
index 416026628..000000000
--- a/ipa-server/ipa-web/client/rpcclient.py
+++ /dev/null
@@ -1,102 +0,0 @@
-#! /usr/bin/python -E
-# Authors: Rob Crittenden <rcritten@redhat.com>
-#
-# Copyright (C) 2007 Red Hat
-# see file 'COPYING' for use and warranty information
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; version 2 or later
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-
-#!/usr/bin/python
-
-try:
- import krbV
-except ImportError:
- pass
-import xmlrpclib
-import socket
-import os
-import base64
-
-# Some errors to catch
-# http://cvs.fedora.redhat.com/viewcvs/ldapserver/ldap/servers/plugins/pam_passthru/README?root=dirsec&rev=1.6&view=auto
-
-# FIXME: do we want this set somewhere else?
-server = xmlrpclib.ServerProxy("http://localhost:80/ipa")
-
-def get_user(username):
- """Get a specific user"""
-
- try:
- result = server.get_user(username)
- myuser = result
- except xmlrpclib.Fault, fault:
- raise xmlrpclib.Fault(fault.faultCode, fault.faultString)
- return None
- except socket.error, (value, msg):
- raise xmlrpclib.Fault(value, msg)
- return None
-
- return myuser
-
-def add_user(user):
- """Add a new user"""
-
- # FIXME: Get the realm from somewhere
- realm="GREYOAK.COM"
-
- # FIXME: This should be dynamic and can include just about anything
- # Let us add in some missing attributes
- if user.get('homeDirectory') is None:
- user['homeDirectory'] ='/home/%s' % user['uid']
- if user.get('gecos') is None:
- user['gecos'] = user['uid']
-
- # FIXME: This can be removed once the DS plugin is installed
- user['uidNumber'] ='501'
-
- # FIXME: What is the default group for users?
- user['gidNumber'] ='501'
- user['krbPrincipalName'] = "%s@%s" % (user['uid'], realm)
- user['cn'] = "%s %s" % (user['gn'], user['sn'])
- if user.get('gn'):
- del user['gn']
-
- try:
- result = server.add_user(user)
- return result
- except xmlrpclib.Fault, fault:
- raise xmlrpclib.Fault(fault.faultCode, fault.faultString)
- return None
- except socket.error, (value, msg):
- raise xmlrpclib.Fault(value, msg)
- return None
-
-def get_add_schema():
- """Get the list of attributes we need to ask when adding a new
- user.
- """
-
- # FIXME: Hardcoded and designed for the TurboGears GUI. Do we want
- # this for the CLI as well?
- try:
- result = server.get_add_schema()
- except xmlrpclib.Fault, fault:
- raise xmlrpclib.Fault(fault,faultCode, fault.faultString)
- return None
- except socket.error, (value, msg):
- raise xmlrpclib.Fault(value, msg)
- return None
-
- return result
diff --git a/ipa-server/ipa-web/gui/README b/ipa-server/ipa-web/gui/README
deleted file mode 100644
index e69de29bb..000000000
--- a/ipa-server/ipa-web/gui/README
+++ /dev/null
diff --git a/ipa-server/ipa-web/client/ipaldap.py b/ipa-server/ipaserver/ipaldap.py
index 50f88520c..50f88520c 100644
--- a/ipa-server/ipa-web/client/ipaldap.py
+++ b/ipa-server/ipaserver/ipaldap.py
diff --git a/ipa-server/ipa-web/api/Makefile b/ipa-server/xmlrpc-server/Makefile
index 6af262ee9..10b796ea6 100644
--- a/ipa-server/ipa-web/api/Makefile
+++ b/ipa-server/xmlrpc-server/Makefile
@@ -1,4 +1,4 @@
-SHAREDIR = $(DESTDIR)/usr/share/ipa
+SHAREDIR = $(DESTDIR)/usr/share/ipa/ipaserver
HTTPDIR = $(DESTDIR)/etc/httpd/conf.d/
all: ;
diff --git a/ipa-server/ipa-web/README b/ipa-server/xmlrpc-server/README
index e69de29bb..e69de29bb 100644
--- a/ipa-server/ipa-web/README
+++ b/ipa-server/xmlrpc-server/README
diff --git a/ipa-server/ipa-web/api/funcs.py b/ipa-server/xmlrpc-server/funcs.py
index b23a40c9b..78180a491 100644
--- a/ipa-server/ipa-web/api/funcs.py
+++ b/ipa-server/xmlrpc-server/funcs.py
@@ -17,10 +17,12 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
+import sys
+sys.path.append("/usr/share/ipa")
+
import ldap
-import ipa
-import ipa.dsinstance
-import ipa.ipaldap
+import ipaserver.dsinstance
+import ipaserver.ipaldap
import pdb
import string
from types import *
@@ -44,11 +46,11 @@ def get_user (username):
# FIXME: Is this the filter we want or should it be more specific?
filter = "(uid=" username ")"
try:
- m1 = ipa.ipaldap.IPAdmin(host,port,binddn,bindpw)
+ m1 = ipaserver.ipaldap.IPAdmin(host,port,binddn,bindpw)
ent = m1.getEntry(basedn, scope, filter, None)
except ldap.LDAPError, e:
raise xmlrpclib.Fault(1, e)
- except ipa.ipaldap.NoSuchEntryError:
+ except ipaserver.ipaldap.NoSuchEntryError:
raise xmlrpclib.Fault(2, "No such user")
# Convert to LDIF
@@ -84,7 +86,7 @@ def get_user (username):
def add_user (user):
"""Add a user in LDAP"""
dn="uid=%s,ou=users,ou=default,dc=greyoak,dc=com" % user['uid']
- entry = ipa.ipaldap.Entry(dn)
+ entry = ipaserver.ipaldap.Entry(dn)
# some required objectclasses
entry.setValues('objectClass', 'top', 'posixAccount', 'shadowAccount', 'account', 'person', 'inetOrgPerson', 'organizationalPerson', 'krbPrincipalAux', 'krbTicketPolicyAux')
@@ -104,7 +106,7 @@ def add_user (user):
entry.setValues(u, user[u])
try:
- m1 = ipa.ipaldap.IPAdmin(host,port,binddn,bindpw)
+ m1 = ipaserver.ipaldap.IPAdmin(host,port,binddn,bindpw)
res = m1.addEntry(entry)
return res
except ldap.ALREADY_EXISTS:
diff --git a/ipa-server/ipa-web/api/ipa.conf b/ipa-server/xmlrpc-server/ipa.conf
index 44c4d25ec..5a1304188 100644
--- a/ipa-server/ipa-web/api/ipa.conf
+++ b/ipa-server/xmlrpc-server/ipa.conf
@@ -1,8 +1,8 @@
# LoadModule auth_kerb_module modules/mod_auth_kerb.so
-Alias /ipa "/usr/share/ipa/XMLRPC"
+Alias /ipa "/usr/share/ipa/ipaserver/XMLRPC"
-<Directory "/usr/share/ipa">
+<Directory "/usr/share/ipaserver">
# AuthType Kerberos
# AuthName "Kerberos Login"
# KrbMethodNegotiate on
diff --git a/ipa-server/ipa-web/api/ipaxmlrpc.py b/ipa-server/xmlrpc-server/ipaxmlrpc.py
index 26cac39ae..1dc15956a 100644
--- a/ipa-server/ipa-web/api/ipaxmlrpc.py
+++ b/ipa-server/xmlrpc-server/ipaxmlrpc.py
@@ -30,7 +30,7 @@ import pprint
from xmlrpclib import Marshaller,loads,dumps,Fault
from mod_python import apache
-import ipa
+import ipaserver
import funcs
import string
import base64
@@ -154,7 +154,7 @@ class ModXMLRPCRequestHandler(object):
func = self.funcs.get(method,None)
if func is None:
raise Fault(1, "Invalid method: %s" % method)
- params,opts = ipa.decode_args(*params)
+ params,opts = ipaserver.decode_args(*params)
ret = func(*params,**opts)
@@ -272,17 +272,3 @@ def handler(req, profiling=False):
finally:
pass
return apache.OK
-diff -r 0afcf345979d ipa-server/ipa-web/client/Makefile
---- a/dev/null Thu Jan 01 00:00:00 1970 0000
- b/ipa-server/ipa-web/client/Makefile Wed Jul 19 20:17:24 2007 -0400
-PYTHONLIBDIR ?= $(shell python -c "from distutils.sysconfig import *; print get_python_lib(1)")
-PACKAGEDIR ?= $(DESTDIR)/$(PYTHONLIBDIR)/ipa
-
-all: ;
-
-install:
- -mkdir -p $(PACKAGEDIR)
- install -m 644 *.py $(PACKAGEDIR)
-
-clean:
- rm -f *~ *.pyc