The Samba-Bugzilla – Attachment 969 Details for
Bug 2145
[patch] run time location for /tmp/.winbindd/pipe
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to solve the runtime localtion conflict with winbind pipe
winbindd_socket_dir.patch (text/plain), 5.39 KB, created by
Oliver Nyderle (dead mail address)
on 2005-02-17 10:22:48 UTC
(
hide
)
Description:
patch to solve the runtime localtion conflict with winbind pipe
Filename:
MIME Type:
Creator:
Oliver Nyderle (dead mail address)
Created:
2005-02-17 10:22:48 UTC
Size:
5.39 KB
patch
obsolete
>--- source/param/loadparm.c.org 2004-12-06 14:22:55.000000000 +0100 >+++ source/param/loadparm.c 2004-12-06 14:31:29.000000000 +0100 >@@ -169,6 +169,7 @@ > char *szTemplatePrimaryGroup; > char *szTemplateHomedir; > char *szTemplateShell; >+ char *szWinbindSocketDir; > char *szWinbindSeparator; > BOOL bWinbindEnableLocalAccounts; > BOOL bWinbindEnumUsers; >@@ -1177,7 +1178,9 @@ > {"template primary group", P_STRING, P_GLOBAL, &Globals.szTemplatePrimaryGroup, NULL, NULL, FLAG_ADVANCED}, > {"template homedir", P_STRING, P_GLOBAL, &Globals.szTemplateHomedir, NULL, NULL, FLAG_ADVANCED}, > {"template shell", P_STRING, P_GLOBAL, &Globals.szTemplateShell, NULL, NULL, FLAG_ADVANCED}, >- {"winbind separator", P_STRING, P_GLOBAL, &Globals.szWinbindSeparator, NULL, NULL, FLAG_ADVANCED}, >+ {"winbind separator", P_STRING, P_GLOBAL, &Globals.szWinbindSeparator, NULL, NULL, FLAG_ADVANCED}, >+ {"private dir", P_STRING, P_GLOBAL, &Globals.szPrivateDir, NULL, NULL, FLAG_ADVANCED}, >+ {"winbind socket dir", P_STRING, P_GLOBAL, &Globals.szWinbindSocketDir, NULL, NULL, FLAG_ADVANCED}, > {"winbind cache time", P_INTEGER, P_GLOBAL, &Globals.winbind_cache_time, NULL, NULL, FLAG_ADVANCED}, > {"winbind enable local accounts", P_BOOL, P_GLOBAL, &Globals.bWinbindEnableLocalAccounts, NULL, NULL, FLAG_ADVANCED}, > {"winbind enum users", P_BOOL, P_GLOBAL, &Globals.bWinbindEnumUsers, NULL, NULL, FLAG_ADVANCED}, >@@ -1313,6 +1316,7 @@ > > string_set(&Globals.szSMBPasswdFile, dyn_SMB_PASSWD_FILE); > string_set(&Globals.szPrivateDir, dyn_PRIVATE_DIR); >+ string_set(&Globals.szWinbindSocketDir, dyn_WINBIND_SOCKET_DIR); > > /* use the new 'hash2' method by default, with a prefix of 1 */ > string_set(&Globals.szManglingMethod, "hash2"); >@@ -1624,6 +1628,7 @@ > FN_GLOBAL_STRING(lp_configfile, &Globals.szConfigFile) > FN_GLOBAL_STRING(lp_smb_passwd_file, &Globals.szSMBPasswdFile) > FN_GLOBAL_STRING(lp_private_dir, &Globals.szPrivateDir) >+FN_GLOBAL_STRING(lp_winbind_socket_dir, &Globals.szWinbindSocketDir) > FN_GLOBAL_STRING(lp_serverstring, &Globals.szServerString) > FN_GLOBAL_INTEGER(lp_printcap_cache_time, &Globals.PrintcapCacheTime) > FN_GLOBAL_STRING(lp_printcapname, &Globals.szPrintcapname) >--- source/lib/util.c.org 2004-12-06 15:03:12.000000000 +0100 >+++ source/lib/util.c 2004-12-06 14:49:19.000000000 +0100 >@@ -2229,6 +2229,26 @@ > } > > /***************************************************************** >+ A useful function for returning a path in the Samba >+ Winbind socket directory. >+*****************************************************************/ >+ >+char *winbind_socket_dir() >+{ >+ static pstring fname; >+ >+ pstrcpy(fname,lp_winbind_socket_dir()); >+ trim_char(fname,'\0','/'); >+ >+ if (!directory_exist(fname,NULL)) >+ mkdir(fname,0755); >+ >+ pstrcat(fname,"/"); >+ >+ return fname; >+} >+ >+/***************************************************************** > A useful function for returning a path in the Samba pid directory. > *****************************************************************/ > >--- source/nsswitch/winbindd_util.c.org 2004-12-06 14:59:24.000000000 +0100 >+++ source/nsswitch/winbindd_util.c 2004-12-06 14:59:56.000000000 +0100 >@@ -670,7 +670,7 @@ > { > if (_winbindd_socket == -1) { > _winbindd_socket = create_pipe_sock( >- WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME, 0755); >+ winbind_socket_dir(), WINBINDD_SOCKET_NAME, 0755); > DEBUG(10, ("open_winbindd_socket: opened socket fd %d\n", > _winbindd_socket)); > } >--- source/nsswitch/wb_common.c.org 2004-12-06 15:24:31.000000000 +0100 >+++ source/nsswitch/wb_common.c 2004-12-06 15:28:30.000000000 +0100 >@@ -298,6 +298,7 @@ > static pid_t our_pid; > struct winbindd_request request; > struct winbindd_response response; >+ const char *winbind_socket; > ZERO_STRUCT(request); > ZERO_STRUCT(response); > >@@ -310,7 +311,8 @@ > return winbindd_fd; > } > >- if ((winbindd_fd = winbind_named_pipe_sock(WINBINDD_SOCKET_DIR)) == -1) { >+ winbind_socket = (const char*) winbind_socket_dir(); >+ if ((winbindd_fd = winbind_named_pipe_sock(winbind_socket)) == -1) { > return -1; > } > >--- source/nsswitch/winbindd.c.org 2004-12-06 14:56:44.000000000 +0100 >+++ source/nsswitch/winbindd.c 2004-12-06 14:58:52.000000000 +0100 >@@ -161,7 +161,7 @@ > > /* Remove socket file */ > pstr_sprintf(path, "%s/%s", >- WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME); >+ winbind_socket_dir(), WINBINDD_SOCKET_NAME); > unlink(path); > exit(0); > } >--- source/dynconfig.c.org 2004-12-06 15:10:13.000000000 +0100 >+++ source/dynconfig.c 2004-12-06 15:10:57.000000000 +0100 >@@ -70,3 +70,4 @@ > > const pstring dyn_SMB_PASSWD_FILE = SMB_PASSWD_FILE; > const pstring dyn_PRIVATE_DIR = PRIVATE_DIR; >+const pstring dyn_WINBIND_SOCKET_DIR = "/tmp/.winbindd/"; >--- source/include/dynconfig.h.org 2004-12-06 15:13:19.000000000 +0100 >+++ source/include/dynconfig.h 2004-12-06 15:13:52.000000000 +0100 >@@ -36,3 +36,4 @@ > extern const pstring dyn_PIDDIR; > extern const pstring dyn_SMB_PASSWD_FILE; > extern const pstring dyn_PRIVATE_DIR; >+extern const pstring dyn_WINBIND_SOCKET_DIR; >--- source/Makefile.in.org Mon Dec 6 17:37:28 2004 >+++ source/Makefile.in Mon Dec 6 17:38:47 2004 >@@ -672,7 +672,7 @@ > > WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) lib/replace1.o @WINBIND_NSS_EXTRA_OBJS@ > >-WINBIND_NSS_PICOBJS = $(WINBIND_NSS_OBJ:.o=.@PICSUFFIX@) lib/snprintf.@PICSUFFIX@ >+WINBIND_NSS_PICOBJS = $(WINBIND_NSS_OBJ:.o=.@PICSUFFIX@) lib/util.@PICSUFFIX@ lib/snprintf.@PICSUFFIX@ > > POPT_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ > popt/popthelp.o popt/poptparse.o
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2145
: 969