FS#44710 - [autofs] 'force_standard_program_map_env' broke existing auto.smb script

Attached to Project: Community Packages
Opened by pedrum (pd5rm) - Friday, 24 April 2015, 00:28 GMT
Last edited by Toolybird (Toolybird) - Friday, 29 July 2022, 02:07 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: I was using the included auto.smb script to automount CIFS shares, and this no longer works after this update.

After settings this new parameter 'force_standard_program_map_env = yes' it seemed to work as before.

Additional info:
autofs 5.1.1-1

Steps to reproduce:

1) Upgrade to new autofs package.
2) Attempt to use the shipped auto.smb to connect to shares. This fails.

{{{
Apr 23 17:25:37 mycomputer.mydomain.com automount[13264]: attempting to mount entry /cifs/<server>
Apr 23 17:25:38 mycomputer.mydomain.com automount[13264]: lookup(program): lookup for <server> failed
Apr 23 17:25:38 mycomputer.mydomain.com automount[13264]: failed to mount /cifs/<server>
}}}
This task depends upon

Closed by  Toolybird (Toolybird)
Friday, 29 July 2022, 02:07 GMT
Reason for closing:  None
Additional comments about closing:  @micwoj92 says "Task should be closed, autofs was dropped to aur https://aur.archlinux.org/packages/autof s"
Comment by pedrum (pd5rm) - Friday, 24 April 2015, 00:31 GMT
I believe this worked on 5.1.0-2. The previous version of autofs I had installed.
Comment by pedrum (pd5rm) - Friday, 24 April 2015, 00:44 GMT
Another workaround option is to use the new AUTOFS_ prefix with auto.smb script. Here's a patch:

~~~~~~
27c27
< uid=${AUTOFS_UID}
---
> uid=${UID}
57c57
< opts="$opts"',uid=$AUTOFS_UID,gid=$AUTOFS_GID,credentials='"$creds"
---
> opts="$opts"',uid=$UID,gid=$GID,credentials='"$creds"
~~~~~~
Comment by Lukas Fleischer (lfleischer) - Sunday, 17 April 2016, 06:24 GMT
Out of curiosity: Is this an upstream issue?
Comment by pedrum (pd5rm) - Tuesday, 26 April 2016, 20:39 GMT
It seems like they defaulted to using AUTOFS_ prefixed envvars in 5.1.1. It's a breaking change for existing autofs scripts if they were using environment variables.

This was listed in changelog as: "add config option to force use of program map stdvars."

The user has two choices:
1) Enable the 'force_standard_program_map_env' flag in autofs.conf to maintain previous compatibility with non-AUTOFS prefixed vars.
2) Leave defaults, and manually update autofs scripts to be prefixed with AUTOFS_ variables.

Unfortunately, the sample scripts still reference the non-prefixed var so they're borked out of the box with default settings. ;-(



Loading...