Mod aaa-12 新增用户管理的makefile,并添加到configm的makefile文件

RCA:
SOL:
修改人:zhouzian
检视人:zhouzian
This commit is contained in:
zhouzian 2019-07-04 15:51:45 +08:00
parent da4ef8eca1
commit 8ab4e9178e
10 changed files with 102 additions and 23 deletions

View File

@ -1,11 +1,11 @@
/* This file is auto generated,for sGATE version info */
/* Used readelf to get this information form driver of application */
/* "readelf --debug-dump=macro <filename>" */
#define sGATE_COMPILE_DATE "2019-07-01"
#define sGATE_COMPILE_TIME "17:53:10"
#define sGATE_COMPILE_MAJOR "20190701"
#define sGATE_COMPILE_SUB "175310"
#define sGATE_COMPILE_BY "cl"
#define sGATE_COMPILE_DATE "2019-07-04"
#define sGATE_COMPILE_TIME "15:46:50"
#define sGATE_COMPILE_MAJOR "20190704"
#define sGATE_COMPILE_SUB "154650"
#define sGATE_COMPILE_BY "zza"
#define sGATE_COMPILE_HOST "esgwdev01"
#define sGATE_GIT_TAGS "aaa812c65-dev"
#define sGATE_GIT_VERS "aaa812c654225f595f12a32bc7d56bcc225f3ee4"
#define sGATE_GIT_TAGS "76e0ad830-dev"
#define sGATE_GIT_VERS "76e0ad8308f233b00aa7c570d17cefe38cc84e3d"

View File

@ -28,9 +28,9 @@ MAKE_FLAGS += -j$(shell cat /proc/cpuinfo | grep processor | wc -l)
endif
endif
.PHONY : demo conntrack netlink trace openrpc configm redismq
.PHONY : demo conntrack netlink trace openrpc configm redismq usermanager
all: demo conntrack netlink trace openrpc configm redismq
all: demo conntrack netlink trace openrpc configm redismq usermanager
ifeq ($(OPT), install)
#$(shell `find ../release -name "*.zip" -delete`)
@ -147,3 +147,12 @@ else ifeq ($(OPT), install)
else
$(MLOG)make all $(MAKE_FLAGS) -C Platform/build -f user.redismq.Makefile MLOG=$(MLOG) DISABLE_WARRING=$(DIS_BUILD_WARRING) MAKE_TARGET=redismq
endif
usermanager:
ifeq ($(OPT), clean)
$(MLOG)make $(MAKE_FLAGS) -C Product/build -f user.usermanager.Makefile cleanall MLOG=$(MLOG) MAKE_TARGET=usermanager
else ifeq ($(OPT), install)
$(MLOG)make $(MAKE_FLAGS) -C Product/build -f user.usermanager.Makefile install DIR=$(DIR) MLOG=$(MLOG) MAKE_TARGET=usermanager
else
$(MLOG)make all $(MAKE_FLAGS) -C Product/build -f user.usermanager.Makefile MLOG=$(MLOG) DISABLE_WARRING=$(DIS_BUILD_WARRING) MAKE_TARGET=usermanager
endif

View File

@ -27,7 +27,7 @@ VPATH = ../user/configm/config-server
# set the source file, don't used .o because of ...
COMMON_SRCS = configserver.c ipconfig/ipconfig.c ipconfig/parsefile.c authfree_config/authfree.c localportal_config/localportal.c userlock_config/userlock.c jumppage_config/jumppage.c
COMMON_SRCS = configserver.c ipconfig/ipconfig.c ipconfig/parsefile.c authfree_config/authfree.c localportal_config/localportal.c userlock_config/userlock.c jumppage_config/jumppage.c user_manager_config/user_group_config.c
# MRS Board Source Files
PLAT_LINUX_SRCS = $(COMMON_SRCS)
@ -42,8 +42,8 @@ PLAT_ARM64_LDFLAGS :=
PLAT_LINUX_LDFLAGS :=
#gcc libs
ARM64_LIBS := ../thirdparty/arm64/libev-arm64.so ./libopenrpc-arm64.so ./libnetlinku-arm64.so -lpthread -lm
LINUX_LIBS := ../thirdparty/x86_64/libev-linux.so ./libopenrpc-linux.so ./libnetlinku-linux.so -lpthread -lm
ARM64_LIBS := -lcjson ../thirdparty/arm64/libev-arm64.so ./libopenrpc-arm64.so ./libnetlinku-arm64.so ../../Product/build/debug/usermanager-arm64.so -lpthread -lm
LINUX_LIBS := -lcjson ../thirdparty/x86_64/libev-linux.so ./libopenrpc-linux.so ./libnetlinku-linux.so ../../Product/build/debug/usermanager-linux.so -lpthread -lm
ifeq ($(PLAT_ARM64), TRUE)
DEPEND_LIB += ../thirdparty/arm64/libev-arm64.so ./debug/libopenrpc-arm64.so ./debug/libnetlinku-arm64.so

View File

@ -23,6 +23,11 @@ typedef ret_code (*usergroup_config)(uint source, uint config_type,
pointer output, int *output_len);
/* 新增用户组 */
ret_code usergroup_config_add_proc(uint source, uint config_type,
pointer input, int input_len,
pointer output, int *output_len);
/* user group config */
ret_code usergroup_config_chk(uint source, uint config_type,
pointer input, int input_len,

View File

@ -1,3 +1,4 @@
#include <cjson/cJSON.h>
#include "configm.h"
#include "user_group_config.h"
#include "rpc.h"
@ -162,7 +163,7 @@ ret_code usergroup_config_proc(uint source, uint config_type,
ret = gs_usergroup_fun_table[fun_type](source, config_type,
input, input_len,
output, *output_len);
output, output_len);
return ret;

View File

@ -0,0 +1,62 @@
# target name, the target name must have the same name of c source file
TARGET_NAME=usermanager
# target
# for linux module driver: KO
# for application: EXE
# for dynamic library: DLL
TARGET_TYPE = DLL
# target object
# for application: APP
# for device driver: DRV
TARGET_OBJ = APP
# custom install dir
TARGET_BOX =
#debug mode or release mode
DEBUG = TRUE
PLAT_LINUX ?= TRUE
PLAT_ARM64 ?= TRUE
VPATH = ../user/user_manager/
# source code
# set the source file, don't used .o because of ...
COMMON_SRCS = array_index.c user_group.c user.c user_mod.c
# MRS Board Source Files
PLAT_LINUX_SRCS = $(COMMON_SRCS)
PLAT_ARM64_SRCS = $(COMMON_SRCS)
# gcc CFLAGS
PLAT_ARM64_CFLAGS := -fPIC -I../../Common -I../common
PLAT_LINUX_CFLAGS := -fPIC -I../../Common -I../common
PLAT_ARM64_LDFLAGS := -fPIC -shared -lpthread
PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS)
# this line must be at below of thus, because of...
include ../../Common/common.Makefile
ifneq ($(MAKECMDGOALS), clean)
ifneq ($(MAKECMDGOALS), cleanall)
ifneq ($(notdir $(DEPEND_LIB)), $(wildcard $(DEPEND_LIB)))
$(shell $(CP) $(DEPEND_LIB) ./)
endif
endif
endif
ifeq ($(MAKECMDGOALS), )
$(shell find ./ -name "$(TARGET)-*.ko" -delete)
else
ifeq ($(MAKECMDGOALS), all)
$(shell find ./ -name "$(TARGET)-*.ko" -delete)
endif
endif

View File

@ -2,7 +2,7 @@
#include<stdlib.h>
#include<stdbool.h>
#include "array_index.h"
#include "../../common/common_user.h"
#include "common_user.h"
ARRAY g_user_index_head = { 0 };
ARRAY g_group_index_head = { 0 };

View File

@ -2,11 +2,11 @@
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include "../../common/common_user.h"
#include "common_user.h"
#include "array_index.h"
#include "user_group.h"
#include "user.h"
#include "user_mod.h"
#include "sg/user/user_manager/user_group.h"
#include "sg/user/user_manager/user.h"
extern ARRAY g_user_index_head;
extern USERGROUP g_group_table[];
@ -105,7 +105,7 @@ void get_user_by_id(unsigned short ID, USERLIST* ulist)
if (NULL == ulist || INVALID_INDEX >= ID || (USER_INDEX_MAX - 1) <= ID)
{
return NULL;
return;
}
memset(ulist, 0, sizeof(ulist));

View File

@ -3,8 +3,8 @@
#include <stdbool.h>
#include <string.h>
#include "array_index.h"
#include "user_group.h"
#include "../../common/common_user.h"
#include "sg/user/user_manager/user_group.h"
#include "common_user.h"
extern ARRAY g_group_index_head;
USERGROUP g_group_table[GROUP_INDEX_MAX];

View File

@ -1,7 +1,9 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "user_mod.h"
#include "user_group.h"
#include "user.h"
#include "sg/user/user_manager/user_group.h"
#include "sg/user/user_manager/user.h"
#include "array_index.h"
#include "common_user.h"