40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
diff -Naurp open-iscsi-6.0.5.595/usr/Makefile open-iscsi-6.0.5.610.work/usr/Makefile
|
|
--- open-iscsi-6.0.5.595/usr/Makefile 2006-06-21 12:32:51.000000000 -0500
|
|
+++ open-iscsi-6.0.5.610.work/usr/Makefile 2006-06-21 12:33:55.000000000 -0500
|
|
@@ -50,8 +50,9 @@ iscsid: $(COMMON_SRCS) $(IPC_OBJ) $(INIT
|
|
iscsiadm: $(COMMON_SRCS) strings.o discovery.o iscsiadm.o
|
|
$(CC) $(CFLAGS) $^ $(DBM_LIB) -o $@
|
|
|
|
-iscsistart: $(IPC_OBJ) $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) iscsistart.o
|
|
- $(CC) $(CFLAGS) $^ -o $@
|
|
+iscsistart: $(IPC_OBJ) $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) iscsistart.o \
|
|
+ statics.o
|
|
+ $(CC) -static $(CFLAGS) $^ -o $@
|
|
|
|
clean:
|
|
rm -f *.o $(PROGRAMS)
|
|
diff -Naurp open-iscsi-6.0.5.595/usr/statics.c open-iscsi-6.0.5.610.work/usr/statics.c
|
|
--- open-iscsi-6.0.5.595/usr/statics.c 1969-12-31 18:00:00.000000000 -0600
|
|
+++ open-iscsi-6.0.5.610.work/usr/statics.c 2006-06-21 12:30:05.000000000 -0500
|
|
@@ -0,0 +1,20 @@
|
|
+#include <unistd.h>
|
|
+#include <pwd.h>
|
|
+#include <sys/errno.h>
|
|
+#include <sys/types.h>
|
|
+
|
|
+static struct passwd root_pw = {
|
|
+ .pw_name = "root",
|
|
+};
|
|
+
|
|
+struct passwd*
|
|
+getpwuid(uid_t uid)
|
|
+{
|
|
+ if (uid == 0)
|
|
+ return &root_pw;
|
|
+ else {
|
|
+ errno = ENOENT;
|
|
+ return 0;
|
|
+ }
|
|
+}
|
|
+
|