Merge branch 'master' of moonshot.suchdamage.org:/srv/git/trust_router
authorMargaret Wasserman <margaret@moonshot-proxy.(none)>
Tue, 30 Apr 2013 20:54:38 +0000 (16:54 -0400)
committerMargaret Wasserman <margaret@moonshot-proxy.(none)>
Tue, 30 Apr 2013 20:54:38 +0000 (16:54 -0400)
Makefile.am
common/tr_msg.c
include/trust_router/tid.h
tid/tidc.c
tid/tids.c
trust_router.spec [new file with mode: 0644]

index 63f273a..a2adee5 100644 (file)
@@ -1,4 +1,4 @@
-bin_PROGRAMS= tr/tr tid/example/tidc tid/example/tids common/dh_test/tr_dh_test
+bin_PROGRAMS= tr/trust_router tid/example/tidc tid/example/tids common/dh_test/tr_dh_test
 AM_CPPFLAGS=-I$(srcdir)/include
 AM_CFLAGS = -Wall -Werror=missing-prototypes -Werror=strict-prototypes -Wno-parentheses
 SUBDIRS = gsscon 
@@ -9,13 +9,13 @@ common/tr_dh.c \
 
 lib_LTLIBRARIES = libtr_tid.la
 
-tr_tr_SOURCES = tr/tr_main.c \
+tr_trust_router_SOURCES = tr/tr_main.c \
 common/tr_config.c \
 common/tr_idp.c \
 common/tr_comm.c \
 tr/tr.c
 
-tr_tr_LDADD = gsscon/libgsscon.la libtr_tid.la
+tr_trust_router_LDADD = gsscon/libgsscon.la libtr_tid.la
 
 tid_example_tidc_SOURCES = tid/example/tidc_main.c 
 
@@ -41,5 +41,9 @@ include/trust_router/tr_versioning.h
 
 noinst_HEADERS = include/gsscon.h include/tr_config.h \
 include/tr_msg.h \
-include/tr.h
+include/tr.h \
+       include/tr_idp.h include/tr_rp.h \
+       include/tr_comm.h
 
+
+EXTRA_DIST = trust_router.spec
index 8138cfc..204f9d6 100644 (file)
@@ -245,7 +245,7 @@ static TID_SRVR_BLK *tr_msg_decode_servers(json_t *jservers)
   size_t i, num_servers;
 
   num_servers = json_array_size(jservers);
-  fprintf(stderr, "tr_msg_decode_servers(): Number of servers = %d.\n", num_servers);
+  fprintf(stderr, "tr_msg_decode_servers(): Number of servers = %u.\n", (unsigned) num_servers);
   
   if (0 == num_servers) {
     fprintf(stderr, "tr_msg_decode_servers(): Server array is empty.\n"); 
index c1778fc..0a7baff 100644 (file)
 
 #include <trust_router/tr_name.h>
 #include <trust_router/tr_versioning.h>
+#include <gssapi.h>
 
 #define TID_PORT       12309
 
-typedef struct gss_ctx_id_struct *gss_ctx_id_t;
+
 
 typedef enum tid_rc {
   TID_SUCCESS = 0,
index 06ae220..5c3028f 100644 (file)
@@ -179,7 +179,7 @@ int tidc_fwd_request (TIDC_INSTANCE *tidc,
     return -1;
   }
 
-  fprintf(stdout, "Response Received (%d bytes).\n", resp_buflen);
+  fprintf(stdout, "Response Received (%u bytes).\n", (unsigned) resp_buflen);
   fprintf(stdout, "%s\n", resp_buf);
 
   if (NULL == (resp_msg = tr_msg_decode(resp_buf, resp_buflen))) {
index d3447cb..c7a125f 100644 (file)
@@ -49,8 +49,11 @@ static int tids_listen (TIDS_INSTANCE *tids, int port)
 {
     int rc = 0;
     int conn = -1;
-    struct sockaddr_storage addr;
-    struct sockaddr_in *saddr = (struct sockaddr_in *) &addr;
+    union {
+      struct sockaddr_storage storage;
+      struct sockaddr_in in4;
+    } addr;
+    struct sockaddr_in *saddr = (struct sockaddr_in *) &addr.in4;
     
     saddr->sin_port = htons (port);
     saddr->sin_family = AF_INET;
@@ -105,7 +108,7 @@ static int tids_read_request (TIDS_INSTANCE *tids, int conn, gss_ctx_id_t *gssct
     return -1;
   }
 
-  fprintf(stdout, "tids_read_request():Request Received, %d bytes.\n", buflen);
+  fprintf(stdout, "tids_read_request():Request Received, %u bytes.\n", (unsigned) buflen);
 
   /* Parse request */
   if (NULL == ((*mreq) = tr_msg_decode(buf, buflen))) {
diff --git a/trust_router.spec b/trust_router.spec
new file mode 100644 (file)
index 0000000..5df4fae
--- /dev/null
@@ -0,0 +1,80 @@
+Name:           trust_router
+Version:        0.0.1
+Release:        1%{?dist}
+Summary:        Moonshot Trust Router
+
+Group:          System Environment/Libraries
+License:        BSD
+URL:            http://www.project-moonshot.org/
+Source0:        %{name}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:  krb5-devel 
+BuildRequires: jansson-devel >= 2.4
+Requires:       mech_eap
+
+%description
+The trust router provides a mechanism for discovering the topology of
+trust graphs in a topology and establishing temporary identities
+between them.
+
+
+%package        devel
+Summary:        Development files for %{name}
+Group:          Development/Libraries
+Requires:       %{name}-libs = %{version}-%{release}
+
+%description    devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}-libs.
+
+%package libs
+Summary: Libraries needed by %{Name}
+
+%description libs
+This package includes libraries needed by the %{Name} package or
+packages that wish trust_router functionality.
+
+
+
+
+%prep
+%setup -q
+
+
+%build
+%configure --disable-static
+make %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%post libs -p /sbin/ldconfig
+
+%postun libs -p /sbin/ldconfig
+
+
+%files
+%defattr(-,root,root,-)
+%doc README
+%{_bindir}/*
+
+%files libs
+%defattr(-,root,root,-)
+%{_libdir}/*.so.*
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/*
+%{_libdir}/*.so
+
+
+