This is a patch for webserver_auth on Drupal 6.x. I don't know if this is the right way to do it now, but it seems to work for me.

Steve.

Comments

moshe weitzman’s picture

Status: Active » Needs work

the .info file also needs changes, at minimum

mecvo1984’s picture

I tried this, didn't work for me. Any suggestions? I replaced the section in webserver_auth.module with the patch. What else do I need to do? Thx.

Paul Natsuo Kishimoto’s picture

Status: Needs work » Needs review
StatusFileSize
new1.1 KB

Here's another version of the patch with the t() re-added. This works (i.e. adds the appropriate menu item under the Administer tree).

I've also attached a patch that adds the line "core = 6.x" to the .info file. This lets me enable the module. However the patch probably this won't apply, because I'm working from the version of the file in the HEAD tarball, which contains lines that are not in the actual file:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/webserver_a...

I find that to be slightly confusing, but whatever.

Paul Natsuo Kishimoto’s picture

Incidentally would it be possible to have a DRUPAL-6 branch created somehow in CVS to submit patches against? I hope to add some functionality without creating more modules.

mecvo1984’s picture

Paul,

Your partch of June 13 did work for me. Thanks.

tinou’s picture

Title: webserver_auth on 6.x » webserver_auth on 6.x is working for me

On a clean Drupal 6.2 install, I applied Paul's patch, then the patch in http://drupal.org/node/247961, then modified the .info to add the "core = 6.x" line. That makes it work for me, on Windows XP with PHP-5.2.4 and PostgreSQL-8.3. I now have SSPI authentication in Drupal.

I realised there's a catch if at install you choose a username that's already existing in the username database you're planning to authenticate your users against. When you turn on webserver_auth module, Drupal will try to create a user of that username, which already exists. I think it should be added to the documentation that at least user #1's username has to be different from any username used with webserver_auth. Moreover, because you won't be able to use that user #1 credentials once you have turned webserver_auth on, you need to have set permissions to let yourself modify the settings of your site.

mecvo1984’s picture

Title: webserver_auth on 6.x is working for me » webserver_auth on 6.x latest version dated 7/17/08

After installing latest module (7/18/08) for Drupal 6.x I get this error when a user tries to authenticate. LDAP is setup correctly and the patched 5.x version of this module was working for me in Drupal 6 so... any ideas?

warning: array_fill() [function.array-fill]: Number of elements must be positive in C:\www\webapps\drupal\includes\database.inc on line 235.
warning: implode() [function.implode]: Invalid arguments passed in C:\www\webapps\drupal\includes\database.inc on line 235.
warning: array_keys() [function.array-keys]: The first argument should be an array in C:\www\webapps\drupal\modules\user\user.module on line 500.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in C:\www\webapps\drupal\modules\user\user.module on line 500.

Paul Natsuo Kishimoto’s picture

Status: Needs review » Closed (duplicate)

Please see #206223: Update for 6.x and try the 6.x-1.x-dev release: http://drupal.org/node/3825/release

mecvo1984’s picture

Hello, I tried the 6.x-1.x-dev release but keep getting the same mysql errors. The person does seem to be authenticated in though. Any further suggestions are welcome. Thanks.

Paul Natsuo Kishimoto’s picture

@mecvo1984: I just enabled the Profile module on the site I'm using webserver_auth on, and I ran into the same SQL errors you reported. Please have a look at #226547: SQL and other errors on external authentication if profile module is enabled.