From 8436e8824e82bec82e839440ad44bca81f6e410c Mon Sep 17 00:00:00 2001 From: RISCi_ATOM Date: Sat, 12 Dec 2020 18:45:04 -0500 Subject: [PATCH] luci : Remove rpcd-mod-rad2-enc --- package/luci/libs/rpcd-mod-rad2-enc/Makefile | 49 ------------------ .../libs/rpcd-mod-rad2-enc/files/rad2-enc | 50 ------------------- 2 files changed, 99 deletions(-) delete mode 100644 package/luci/libs/rpcd-mod-rad2-enc/Makefile delete mode 100755 package/luci/libs/rpcd-mod-rad2-enc/files/rad2-enc diff --git a/package/luci/libs/rpcd-mod-rad2-enc/Makefile b/package/luci/libs/rpcd-mod-rad2-enc/Makefile deleted file mode 100644 index 4cffc01cd3..0000000000 --- a/package/luci/libs/rpcd-mod-rad2-enc/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2016-2017 Jo-Philipp Wich -# -# Licensed under the Apache License, Version 2.0. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rpcd-mod-rad2-enc -PKG_VERSION:=20190109 -PKG_MAINTAINER:=Daniel Dickinson - -PKG_LICENSE:=Apache-2.0 - -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Build/Prepare - true -endef - -define Build/Compile - true -endef - -define Package/rpcd-mod-rad2-enc - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Radicale 2.x Hashing RPC module - DEPENDS:=+rpcd +python3 +python3-passlib -endef - -define Package/rpcd-mod-rad2-enc/description - Python3 password hashing module for use Radicale 2.x LuCI app -endef - -define Package/rpcd-mod-rad2-enc/install - $(INSTALL_DIR) $(1)/usr/libexec/rpcd - $(INSTALL_BIN) ./files/rad2-enc $(1)/usr/libexec/rpcd -endef - -define Package/rpcd-mod-rad2-enc/postinst -#!/bin/sh -killall -HUP rpcd 2>/dev/null -exit 0 -endef - -$(eval $(call BuildPackage,rpcd-mod-rad2-enc)) diff --git a/package/luci/libs/rpcd-mod-rad2-enc/files/rad2-enc b/package/luci/libs/rpcd-mod-rad2-enc/files/rad2-enc deleted file mode 100755 index 43bc49325c..0000000000 --- a/package/luci/libs/rpcd-mod-rad2-enc/files/rad2-enc +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/python3 - -import base64 -import sys -import json -from passlib import hash - -def main(): - - if len(sys.argv) < 2: - return -1 - - if sys.argv[1] == 'list': - print('{ "encrypt": { "type": "str", "plainpass": "str" } }\n') - return 0 - - if sys.argv[1] == 'call': - if len(sys.argv) < 3: - return -1 - - if sys.argv[2] != 'encrypt': - return -1 - - encpass = "" - try: - jsonin = json.loads(sys.stdin.readline()) - enctype = jsonin['type'].strip() - plainpass = jsonin['plainpass'] - - if enctype == 'ssha': - encpass = hash.ldap_salted_sha1.hash(plainpass) - elif enctype == 'sha1': - encpass = hash.ldap_sha1.hash(plainpass) - elif enctype == 'plain': - encpass = plainpass - elif enctype == 'md5': - encpass = hash.apr_md5_crypt.hash(plainpass) - elif enctype == 'bcrypt': - encpass = hash.bcrypt.hash(plainpass) - elif enctype == 'crypt': - encpass = hash.des_crypt.hash(plainpass) - - except: - encpass = "" - - print(json.dumps({ "encrypted_password": encpass})) - - return 0 - -main() -- 2.25.1