Эх сурвалжийг харах

HUE-559. The setuid binary in the shell app should be in a build directory.

Aditya Acharya 14 жил өмнө
parent
commit
bdd3aca54f

+ 1 - 1
apps/shell/Makefile

@@ -26,7 +26,7 @@ clean:: remove_setuid
 
 .PHONY: setuid
 setuid:
-	make -C src/shell setuid
+	make -C src/shell
 
 .PHONY: remove_setuid
 remove_setuid:

+ 6 - 2
apps/shell/src/shell/Makefile

@@ -16,10 +16,14 @@
 
 CC := gcc
 CFLAGS := -Werror -Wall
+DESTDIR := build
 
-setuid: setuid.c
+default: $(DESTDIR)/setuid
+
+$(DESTDIR)/setuid: setuid.c
+	mkdir -p $(@D)
 	$(CC) $(CFLAGS) $< -o $@
 	chmod 4711 $@
 
 clean:
-	rm -f setuid
+	rm -rf $(DESTDIR)

+ 1 - 1
apps/shell/src/shell/shellmanager.py

@@ -43,7 +43,7 @@ from hadoop.cluster import all_mrclusters, get_all_hdfs
 
 LOG = logging.getLogger(__name__)
 
-_SETUID_PROG = os.path.join(os.path.dirname(__file__), 'setuid')
+_SETUID_PROG = os.path.join(os.path.dirname(__file__), 'build', 'setuid')
 
 class NewShellInterrupt(Exception):
   """