Skip to content

Commit c5d8ea5

Browse files
committed
feat: dde-api安全整改,优化调整
makefile中入参改用ifneq判断,dde-api安装时创建deepin-daemon用户 Log: dde-api安全整改 PMS: TASK-369021
1 parent f130a30 commit c5d8ea5

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ install-binary:
143143
mkdir -pv ${DESTDIR}${SYSTEMD_SERVICE_DIR}
144144
cp -R misc/systemd/system/*.service ${DESTDIR}${SYSTEMD_SERVICE_DIR}
145145
# 默认不安装 deepin-locale-helper.service,只有显式开启时才保留
146-
if [ "${INSTALL_LOCALE_HELPER}" != "1" ]; then \
147-
rm -f ${DESTDIR}${SYSTEMD_SERVICE_DIR}/deepin-locale-helper.service; \
148-
rm -f ${DESTDIR}${PREFIX}/share/dbus-1/system-services/org.deepin.dde.LocaleHelper1.service; \
149-
rm -f ${DESTDIR}${PREFIX}/share/polkit-1/actions/org.deepin.dde.locale-helper.policy; \
150-
rm -f ${DESTDIR}${PREFIX}/share/dbus-1/system.d/org.deepin.dde.LocaleHelper1.conf; \
151-
fi
146+
ifneq ($(INSTALL_LOCALE_HELPER), 1)
147+
rm -f ${DESTDIR}${SYSTEMD_SERVICE_DIR}/deepin-locale-helper.service;
148+
rm -f ${DESTDIR}${PREFIX}/share/dbus-1/system-services/org.deepin.dde.LocaleHelper1.service;
149+
rm -f ${DESTDIR}${PREFIX}/share/polkit-1/actions/org.deepin.dde.locale-helper.policy;
150+
rm -f ${DESTDIR}${PREFIX}/share/dbus-1/system.d/org.deepin.dde.LocaleHelper1.conf;
151+
endif
152152

153153
mkdir -pv ${DESTDIR}${PREFIX}/share/icons/hicolor
154154
cp -R misc/icons/* ${DESTDIR}${PREFIX}/share/icons/hicolor

debian/deepin-daemon.sysusers

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Type Name ID GECOS Home directory Shell
2+
u deepin-daemon - "" - -
3+
m deepin-daemon netdev

debian/rules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ endif
1414
dh $@ --buildsystem=makefile
1515

1616
override_dh_auto_install:
17+
dh_installsysusers deepin-daemon.sysusers
1718
dh_auto_install -- INSTALL_LOCALE_HELPER=1
1819

1920
override_dh_strip:

0 commit comments

Comments
 (0)