Permalink
Browse files

Accomdate changes in libne build, giving us some of their configured …

…#defines.
  • Loading branch information...
jti-lanl committed Oct 5, 2018
1 parent 9cfa711 commit e6317c0539b429f4d678fed7d81eef958b40eeb0
Showing with 12 additions and 11 deletions.
  1. +4 −7 Makefile.am
  2. +6 −2 fuse/src/dal.c
  3. +2 −2 fuse/src/dal.h
@@ -46,11 +46,6 @@ if USE_DAL
AM_CPPFLAGS += -DUSE_DAL=1
endif

if USE_MC_SOCKETS
AM_CPPFLAGS += -DS3_AUTH
endif


if USE_MDAL
AM_CPPFLAGS += -DUSE_MDAL=1
endif
@@ -377,7 +372,8 @@ gdb:
# @ exec gdb marfs_fuse `ps -elf | egrep 'marfs_fuse(.*)/marfs' | grep -v grep | awk '{print $$4}'`

fuse_pid:
ps -elf | grep marfs_fuse | grep $(MARFS_MNT) | grep -v grep | awk '{print $$4}'
@ # make turns "$$" into "$".
ps -elf | grep marfs_fuse | grep -v grep | egrep "$(MARFS_MNT)\$$" | awk '{print $$4}'

# fusectl filesystem. Under the fusectl mount-point, each existing
# connection has a numbered subdirectory. There's a special file named
@@ -422,7 +418,8 @@ _mnt:
$(EXEC) ./marfs_fuse $(FUSE_FLAGS) $(MARFS_MNT) $(LOG) &
@ echo "sleeping to give background fuse a chance to start"
sleep 1
@ ps -elf | grep marfs_fuse | grep $(MARFS_MNT) | grep -v grep | awk '{print $$4}' > $(PID)
@ # make turns "$$" into "$".
@ ps -elf | grep marfs_fuse | grep -v grep | egrep "$(MARFS_MNT)\$$" | awk '{print $$4}' > $(PID)
@ echo "PID: " `cat $(PID)`

mnt: mnt.std
@@ -820,11 +820,15 @@ int mc_config(struct DAL* dal,
SEM_INIT(&config->lock, 0, 1);
}

#ifdef S3_AUTH
#if S3_AUTH
// To allow generating per-connection auth-signatures, capture the S3
// credentials up front, while we have access to the AWS config file
// (i.e. before de-escalation). If mc_user is null, skt_auth_install()
// defaults to SKT_S3_USER.
//
// NOTE: S3_AUTH is defined during *libne* configuration. The idea is
// that, if the RMDA server is built to expect S3-authentication,
// then it doesn't make sense for clients to be built without it.

if (is_sockets) {

@@ -875,7 +879,7 @@ void mc_deconfig(struct DAL *dal) {
MC_Config *config = (MC_Config*)dal->global_state;
WAIT(&config->lock);

# ifdef S3_AUTH
# if S3_AUTH
if (config->auth)
skt_auth_free(config->auth);
# endif
@@ -100,9 +100,9 @@ OF SUCH DAMAGE.

#if USE_MC

# ifdef S3_AUTH
# include "skt_config.h" // libne configure-time #defines, like S3_AUTH
# if S3_AUTH
# include <aws4c.h>
# define SOCKETS /* affects erasure.h */
# endif
# define DEFAULT_SKT_AUTH_USER "mcadmin" /* libne's SKT_S3_USER might diverge */

0 comments on commit e6317c0

Please sign in to comment.