Mod aaa-12 新增用户管理的makefile,并添加到configm的makefile文件
RCA: SOL: 修改人:zhouzian 检视人:zhouzian
This commit is contained in:
parent
da4ef8eca1
commit
8ab4e9178e
|
@ -1,11 +1,11 @@
|
||||||
/* This file is auto generated,for sGATE version info */
|
/* This file is auto generated,for sGATE version info */
|
||||||
/* Used readelf to get this information form driver of application */
|
/* Used readelf to get this information form driver of application */
|
||||||
/* "readelf --debug-dump=macro <filename>" */
|
/* "readelf --debug-dump=macro <filename>" */
|
||||||
#define sGATE_COMPILE_DATE "2019-07-01"
|
#define sGATE_COMPILE_DATE "2019-07-04"
|
||||||
#define sGATE_COMPILE_TIME "17:53:10"
|
#define sGATE_COMPILE_TIME "15:46:50"
|
||||||
#define sGATE_COMPILE_MAJOR "20190701"
|
#define sGATE_COMPILE_MAJOR "20190704"
|
||||||
#define sGATE_COMPILE_SUB "175310"
|
#define sGATE_COMPILE_SUB "154650"
|
||||||
#define sGATE_COMPILE_BY "cl"
|
#define sGATE_COMPILE_BY "zza"
|
||||||
#define sGATE_COMPILE_HOST "esgwdev01"
|
#define sGATE_COMPILE_HOST "esgwdev01"
|
||||||
#define sGATE_GIT_TAGS "aaa812c65-dev"
|
#define sGATE_GIT_TAGS "76e0ad830-dev"
|
||||||
#define sGATE_GIT_VERS "aaa812c654225f595f12a32bc7d56bcc225f3ee4"
|
#define sGATE_GIT_VERS "76e0ad8308f233b00aa7c570d17cefe38cc84e3d"
|
||||||
|
|
13
Makefile
13
Makefile
|
@ -28,9 +28,9 @@ MAKE_FLAGS += -j$(shell cat /proc/cpuinfo | grep processor | wc -l)
|
||||||
endif
|
endif
|
||||||
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)
|
ifeq ($(OPT), install)
|
||||||
#$(shell `find ../release -name "*.zip" -delete`)
|
#$(shell `find ../release -name "*.zip" -delete`)
|
||||||
|
@ -147,3 +147,12 @@ else ifeq ($(OPT), install)
|
||||||
else
|
else
|
||||||
$(MLOG)make all $(MAKE_FLAGS) -C Platform/build -f user.redismq.Makefile MLOG=$(MLOG) DISABLE_WARRING=$(DIS_BUILD_WARRING) MAKE_TARGET=redismq
|
$(MLOG)make all $(MAKE_FLAGS) -C Platform/build -f user.redismq.Makefile MLOG=$(MLOG) DISABLE_WARRING=$(DIS_BUILD_WARRING) MAKE_TARGET=redismq
|
||||||
endif
|
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
|
|
@ -27,7 +27,7 @@ VPATH = ../user/configm/config-server
|
||||||
|
|
||||||
# set the source file, don't used .o because of ...
|
# 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
|
# MRS Board Source Files
|
||||||
PLAT_LINUX_SRCS = $(COMMON_SRCS)
|
PLAT_LINUX_SRCS = $(COMMON_SRCS)
|
||||||
|
@ -42,8 +42,8 @@ PLAT_ARM64_LDFLAGS :=
|
||||||
PLAT_LINUX_LDFLAGS :=
|
PLAT_LINUX_LDFLAGS :=
|
||||||
|
|
||||||
#gcc libs
|
#gcc libs
|
||||||
ARM64_LIBS := ../thirdparty/arm64/libev-arm64.so ./libopenrpc-arm64.so ./libnetlinku-arm64.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 := ../thirdparty/x86_64/libev-linux.so ./libopenrpc-linux.so ./libnetlinku-linux.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)
|
ifeq ($(PLAT_ARM64), TRUE)
|
||||||
DEPEND_LIB += ../thirdparty/arm64/libev-arm64.so ./debug/libopenrpc-arm64.so ./debug/libnetlinku-arm64.so
|
DEPEND_LIB += ../thirdparty/arm64/libev-arm64.so ./debug/libopenrpc-arm64.so ./debug/libnetlinku-arm64.so
|
||||||
|
|
|
@ -23,6 +23,11 @@ typedef ret_code (*usergroup_config)(uint source, uint config_type,
|
||||||
pointer output, int *output_len);
|
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 */
|
/* user group config */
|
||||||
ret_code usergroup_config_chk(uint source, uint config_type,
|
ret_code usergroup_config_chk(uint source, uint config_type,
|
||||||
pointer input, int input_len,
|
pointer input, int input_len,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <cjson/cJSON.h>
|
||||||
#include "configm.h"
|
#include "configm.h"
|
||||||
#include "user_group_config.h"
|
#include "user_group_config.h"
|
||||||
#include "rpc.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,
|
ret = gs_usergroup_fun_table[fun_type](source, config_type,
|
||||||
input, input_len,
|
input, input_len,
|
||||||
output, *output_len);
|
output, output_len);
|
||||||
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include<stdlib.h>
|
#include<stdlib.h>
|
||||||
#include<stdbool.h>
|
#include<stdbool.h>
|
||||||
#include "array_index.h"
|
#include "array_index.h"
|
||||||
#include "../../common/common_user.h"
|
#include "common_user.h"
|
||||||
|
|
||||||
ARRAY g_user_index_head = { 0 };
|
ARRAY g_user_index_head = { 0 };
|
||||||
ARRAY g_group_index_head = { 0 };
|
ARRAY g_group_index_head = { 0 };
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "../../common/common_user.h"
|
#include "common_user.h"
|
||||||
#include "array_index.h"
|
#include "array_index.h"
|
||||||
#include "user_group.h"
|
|
||||||
#include "user.h"
|
|
||||||
#include "user_mod.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 ARRAY g_user_index_head;
|
||||||
extern USERGROUP g_group_table[];
|
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)
|
if (NULL == ulist || INVALID_INDEX >= ID || (USER_INDEX_MAX - 1) <= ID)
|
||||||
{
|
{
|
||||||
return NULL;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(ulist, 0, sizeof(ulist));
|
memset(ulist, 0, sizeof(ulist));
|
||||||
|
@ -268,4 +268,4 @@ bool mod_user_line(char* uname, const int intype, char* in)
|
||||||
result = g_user_modfunc_table[intype](uid, in);
|
result = g_user_modfunc_table[intype](uid, in);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "array_index.h"
|
#include "array_index.h"
|
||||||
#include "user_group.h"
|
#include "sg/user/user_manager/user_group.h"
|
||||||
#include "../../common/common_user.h"
|
#include "common_user.h"
|
||||||
|
|
||||||
extern ARRAY g_group_index_head;
|
extern ARRAY g_group_index_head;
|
||||||
USERGROUP g_group_table[GROUP_INDEX_MAX];
|
USERGROUP g_group_table[GROUP_INDEX_MAX];
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include "user_mod.h"
|
#include "user_mod.h"
|
||||||
#include "user_group.h"
|
#include "sg/user/user_manager/user_group.h"
|
||||||
#include "user.h"
|
#include "sg/user/user_manager/user.h"
|
||||||
#include "array_index.h"
|
#include "array_index.h"
|
||||||
#include "common_user.h"
|
#include "common_user.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue